Commit a2723038 authored by owsla's avatar owsla

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@918 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent c0613678
New in v1.1.18 (????/??/??) 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 Ignore Extended Attributes which have Unicode characters outside the current
system representation. These will be correctly handled when rdiff-backup system representation. These will be correctly handled when rdiff-backup
switches to Python 3, which will have full Unicode support. (Andrew Ferguson) switches to Python 3, which will have full Unicode support. (Andrew Ferguson)
......
...@@ -273,9 +273,14 @@ def make_file_dict(filename): ...@@ -273,9 +273,14 @@ def make_file_dict(filename):
(incomplete) rpath object. (incomplete) rpath object.
""" """
if os.name != 'nt': if os.name != 'nt':
return C.make_file_dict(filename) try:
else: return C.make_file_dict(filename)
return make_file_dict_python(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): def make_file_dict_python(filename):
"""Create the data dictionary using a Python call to os.lstat """Create the data dictionary using a Python call to os.lstat
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment