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/vdrive/%22file:/listings/frontends/components/com_hotproperty/css/webapi.txt?a=commitdiff_plain;h=refs%2Fheads%2F2553.do-not-read-from-own-dmd.2;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):