From 04c26c19f6d3df6c54da88b07c4ad602fac65d01 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 2 Nov 2015 18:28:58 +0000 Subject: [PATCH] Ugly hack. Why is this needed?! Signed-off-by: Daira Hopwood --- src/allmydata/frontends/magic_folder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 09b646d9..00c10903 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -357,7 +357,9 @@ class Uploader(QueueMixin): self._notifier.watch(fp, mask=self.mask, callbacks=[self._notify], recursive=True) uploadable = Data("", self._client.convergence) - _assert(encoded_path_u.endswith(magicpath.path2magic(u"/"))) + encoded_slash_u = magicpath.path2magic(u"/") + if not encoded_path_u.endswith(encoded_slash_u): + encoded_path_u += encoded_slash_u self._log("encoded_path_u = %r" % (encoded_path_u,)) upload_d = self._upload_dirnode.add_file(encoded_path_u, uploadable, metadata={"version":0}, overwrite=True) def _succeeded(ign): -- 2.45.2