Commit 2f71f7e1 authored by owsla's avatar owsla

Improve Unicode support when logging in eas_acls.py (Fix from Saptarshi Guha)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@884 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 544376ef
New in v1.1.16 (????/??/??) New in v1.1.16 (????/??/??)
--------------------------- ---------------------------
Improve Unicode support by escaping Unicode characters in filenames
when printing them in log messages from eas_acls.py. (Fix from
Saptarshi Guha)
Handle Windows' lack of getuid(), getgid(), hardlinks and symlinks in Handle Windows' lack of getuid(), getgid(), hardlinks and symlinks in
fs_abilities.py. Use subproces.Popen() on Windows since it does not support fs_abilities.py. Use subproces.Popen() on Windows since it does not support
os.popen2(). (Patch from Josh Nisly) os.popen2(). (Patch from Josh Nisly)
......
...@@ -61,7 +61,7 @@ class ExtendedAttributes: ...@@ -61,7 +61,7 @@ class ExtendedAttributes:
if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM: if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM:
return # if not supported, consider empty return # if not supported, consider empty
if exc[0] == errno.EACCES: if exc[0] == errno.EACCES:
log.Log("Warning: listattr(%s): %s" % (rp.path, exc), 3) log.Log("Warning: listattr(%s): %s" % (repr(rp.path), exc), 3)
return return
raise raise
for attr in attr_list: for attr in attr_list:
...@@ -90,7 +90,7 @@ class ExtendedAttributes: ...@@ -90,7 +90,7 @@ class ExtendedAttributes:
# to bail out or be too noisy at low log levels. # to bail out or be too noisy at low log levels.
if exc[0] == errno.EACCES: if exc[0] == errno.EACCES:
log.Log("Warning: unable to remove xattr %s from %s" log.Log("Warning: unable to remove xattr %s from %s"
% (name, rp.path), 7) % (name, repr(rp.path)), 7)
continue continue
else: raise else: raise
except IOError, exc: except IOError, exc:
...@@ -109,7 +109,7 @@ class ExtendedAttributes: ...@@ -109,7 +109,7 @@ class ExtendedAttributes:
# fail gracefully if can't call setxattr # fail gracefully if can't call setxattr
if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EACCES: if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EACCES:
log.Log("Warning: unable to write xattr %s to %s" log.Log("Warning: unable to write xattr %s to %s"
% (name, rp.path), 6) % (name, repr(rp.path)), 6)
continue continue
else: raise else: raise
......
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