Skip to content

Commit

Permalink
Changes filename to unicode before placing the file. refs #2027
Browse files Browse the repository at this point in the history
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Jan 30, 2015
1 parent 588c743 commit 00c5651
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/allmydata/scripts/tahoe_cp.py
Expand Up @@ -703,6 +703,7 @@ def assign_targets(self, source, target):
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" %
Expand Down Expand Up @@ -743,6 +744,7 @@ def copy_file(self, source, target):
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
Expand Down

0 comments on commit 00c5651

Please sign in to comment.