Ugly hack. Why is this needed?!

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2015-11-02 18:28:58 +00:00
parent 034f9910b4
commit 04c26c19f6

View 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):