Browse code

fix warning messages with encoded filenames

Matt Domsch authored on 2014/03/12 23:09:15
Showing 1 changed files
... ...
@@ -938,7 +938,7 @@ def cmd_sync_remote2local(args):
938 938
                 if not dir_cache.has_key(dst_dir):
939 939
                     dir_cache[dst_dir] = Utils.mkdir_with_parents(dst_dir)
940 940
                 if dir_cache[dst_dir] == False:
941
-                    warning(u"%s: destination directory not writable: %s" % (file, dst_dir))
941
+                    warning(u"%s: destination directory not writable: %s" % (unicodise(file), unicodise(dst_dir)))
942 942
                     continue
943 943
 
944 944
                 try:
... ...
@@ -956,7 +956,7 @@ def cmd_sync_remote2local(args):
956 956
                         debug(u"renamed chkptfname=%s to dst_file=%s" % (unicodise(chkptfname), unicodise(dst_file)))
957 957
                 except OSError, e:
958 958
                     if e.errno == errno.EISDIR:
959
-                        warning(u"%s is a directory - skipping over" % dst_file)
959
+                        warning(u"%s is a directory - skipping over" % unicodise(dst_file))
960 960
                         continue
961 961
                     else:
962 962
                         raise
... ...
@@ -1000,10 +1000,10 @@ def cmd_sync_remote2local(args):
1000 1000
                         os.remove(chkptfname)
1001 1001
                     except: pass
1002 1002
                     if e.errno == errno.EEXIST:
1003
-                        warning(u"%s exists - not overwriting" % (dst_file))
1003
+                        warning(u"%s exists - not overwriting" % unicodise(dst_file))
1004 1004
                         continue
1005 1005
                     if e.errno in (errno.EPERM, errno.EACCES):
1006
-                        warning(u"%s not writable: %s" % (dst_file, e.strerror))
1006
+                        warning(u"%s not writable: %s" % (unicodise(dst_file), e.strerror))
1007 1007
                         continue
1008 1008
                     raise e
1009 1009
                 except KeyboardInterrupt: