summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index ec276d4..0dadd43 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -273,9 +273,14 @@ def make_file_dict(filename):
(incomplete) rpath object.
"""
if os.name != 'nt':
- return C.make_file_dict(filename)
- else:
- return make_file_dict_python(filename)
+ try:
+ return C.make_file_dict(filename)
+ except OSError, error:
+ # Unicode filenames should be process by the Python version
+ if error.errno != errno.EILSEQ and error.errno != errno.EINVAL:
+ raise
+
+ return make_file_dict_python(filename)
def make_file_dict_python(filename):
"""Create the data dictionary using a Python call to os.lstat