diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-07-22 17:46:59 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-07-22 17:46:59 +0000 |
commit | 69d2e0de21c6de8c5ab17fdc67b99bce8aab9752 (patch) | |
tree | d1ddee83b6c83401a63a0be72da28b1f5406a333 /rdiff-backup/rdiff_backup | |
parent | f3bf53dd18ab9fd3c1fe265dfaab7c381226a189 (diff) | |
download | rdiff-backup-69d2e0de21c6de8c5ab17fdc67b99bce8aab9752.tar.gz |
Fall back on the Python make_file_dict function when the filename contains
non-ASCII characters.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@918 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup')
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 11 |
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 |