From 0b1148be94780b7fa54fe8cd2a729fb6bd0e4fe2 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sat, 11 Oct 2014 23:45:13 +0100 Subject: [PATCH] Changes filename to unicode before placing the file. refs #2027 Author: Mark Berger Signed-off-by: Daira Hopwood --- src/allmydata/scripts/tahoe_cp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/allmydata/scripts/tahoe_cp.py b/src/allmydata/scripts/tahoe_cp.py index 965aa26f..2debac85 100644 --- a/src/allmydata/scripts/tahoe_cp.py +++ b/src/allmydata/scripts/tahoe_cp.py @@ -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 -- 2.45.2