From: Daira Hopwood Date: Mon, 2 Nov 2015 18:28:58 +0000 (+0000) Subject: Ugly hack. Why is this needed?! X-Git-Url: https://git.rkrishnan.org/schema.xhtml?a=commitdiff_plain;h=04c26c19f6d3df6c54da88b07c4ad602fac65d01;p=tahoe-lafs%2Ftahoe-lafs.git Ugly hack. Why is this needed?! Signed-off-by: Daira Hopwood --- 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):