summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-07-22 16:47:10 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-07-22 16:47:10 +0000
commitf3bf53dd18ab9fd3c1fe265dfaab7c381226a189 (patch)
tree258429c8a0266cb9530d792a23353f713c80e298
parent74db51ac9a49202052fb0f47f0a66e39c15e4362 (diff)
downloadrdiff-backup-f3bf53dd18ab9fd3c1fe265dfaab7c381226a189.tar.gz
Ignore Extended Attributes which have Unicode characters outside the current
system representation. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@917 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/eas_acls.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 10b7f72..9821b2b 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.18 (????/??/??)
---------------------------
+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)
New in v1.1.17 (2008/07/17)
diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py
index 6b1e128..856b700 100644
--- a/rdiff-backup/rdiff_backup/eas_acls.py
+++ b/rdiff-backup/rdiff_backup/eas_acls.py
@@ -150,7 +150,11 @@ def EA2Record(ea):
if not val: str_list.append(name)
else:
encoded_val = base64.encodestring(val).replace('\n', '')
- str_list.append('%s=0s%s' % (C.acl_quote(name), encoded_val))
+ try:
+ str_list.append('%s=0s%s' % (C.acl_quote(name), encoded_val))
+ except UnicodeEncodeError:
+ log.Log("Warning: unable to store Unicode extended attribute %s"
+ % repr(name), 3)
return '\n'.join(str_list)+'\n'
def Record2EA(record):