From be086057ae3258f1f069929ea9d36744f6845f98 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 12 Sep 2012 16:10:42 +0000 Subject: Encode the root path for os.walk() Unfortunately we were running into issues with unicode filenames in repositories causing set_mtime_recursively() to explode. This fixes the problem. Reviewed-By: Lars Wirzenius (In real life) --- morphlib/builder2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'morphlib/builder2.py') diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 9d729384..028926a1 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -348,7 +348,7 @@ class ChunkBuilder(BuilderBase): ''' now = time.time() - for dirname, subdirs, basenames in os.walk(root, topdown=False): + for dirname, subdirs, basenames in os.walk(root.encode("utf-8"), topdown=False): for basename in basenames: pathname = os.path.join(dirname, basename) # we need the following check to ignore broken symlinks -- cgit v1.2.1