]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Changes filename to unicode before placing the file. refs #2027 2027-inconsistent-tahoe-cp-1
authorDaira Hopwood <daira@jacaranda.org>
Sat, 11 Oct 2014 22:45:13 +0000 (23:45 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Sat, 11 Oct 2014 22:45:13 +0000 (23:45 +0100)
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/scripts/tahoe_cp.py

index 965aa26f3fa42aa8936339763ea1655d8ed7fb2a..2debac85cb89ce0d00cbf0d6746ea4e2d4bf15a9 100644 (file)
@@ -702,6 +702,7 @@ class Copier:
     def copy_files_to_target(self, targetmap, target):
         for name, source in targetmap.items():
             assert isinstance(source, (LocalFileSource, TahoeFileSource))
+            name = unicode(name)
             self.copy_file_into(source, name, target)
             self.files_copied += 1
             self.progress("%d/%d files, %d/%d directories" %
@@ -742,6 +743,7 @@ class Copier:
     def copy_file_into(self, source, name, target):
         assert isinstance(source, (LocalFileSource, TahoeFileSource))
         assert isinstance(target, (LocalDirectoryTarget, TahoeDirectoryTarget))
+        assert isinstance(name, unicode)
         if self.need_to_copy_bytes(source, target):
             # if the target is a local directory, this will just write the
             # bytes to disk. If it is a tahoe directory, it will upload the