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 (????/??/??)
---------------------------
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)
......
......@@ -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
......
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