]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Ugly hack. Why is this needed?! 2553.do-not-read-from-own-dmd.2
authorDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 18:28:58 +0000 (18:28 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 18:28:58 +0000 (18:28 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py

index 09b646d9ad686a39bea278abec93324a6abb00a4..00c10903523e853d62dc0eeadb2f32ead55fcc9d 100644 (file)
@@ -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):