diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 3 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 9821b2b..5398ced 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.1.18 (????/??/??) --------------------------- +Fall back on the Python make_file_dict function when the filename contains +non-ASCII characters. (Andrew Ferguson) + Ignore Extended Attributes which have Unicode characters outside the current system representation. These will be correctly handled when rdiff-backup switches to Python 3, which will have full Unicode support. (Andrew Ferguson) 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 |