summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-23 13:49:29 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-23 13:49:29 +0000
commitc2f5082c27443e80e59e73cc3fae19e20cb0ab48 (patch)
tree57c4ab360f02c2261b2ff14a0cb010d8297d7b2a
parent16cb4fb3df42c47cbbf736555e3d3d46cc3c7e7e (diff)
downloadrdiff-backup-c2f5082c27443e80e59e73cc3fae19e20cb0ab48.tar.gz
Actually make rdiff-backup robust to failure to read an ACL because the
file cannot be found. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@901 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/eas_acls.py12
2 files changed, 10 insertions, 5 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 1e1c1a4..847ed5b 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.17 (????/??/??)
---------------------------
+Actually make rdiff-backup robust to failure to read an ACL because the file
+cannot be found. (Andrew Ferguson)
+
Get makedist working on Windows. (Patch from Josh Nisly)
diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py
index 513af14..a6fac3d 100644
--- a/rdiff-backup/rdiff_backup/eas_acls.py
+++ b/rdiff-backup/rdiff_backup/eas_acls.py
@@ -96,7 +96,7 @@ class ExtendedAttributes:
except IOError, exc:
if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM:
return # if not supported, consider empty
- if exc[0] == errno.ENOENT: # path is bad
+ elif exc[0] == errno.ENOENT: # path is bad
log.Log("Warning: unable to clear xattrs on %s: %s" %
(repr(rp.path), exc), 3)
return
@@ -382,8 +382,9 @@ def get_acl_lists_from_rp(rp):
assert rp.conn is Globals.local_connection
try: acl = posix1e.ACL(file=rp.path)
except IOError, exc:
- if exc[0] == errno.EOPNOTSUPP: acl = None
- if exc[0] == errno.ENOENT:
+ if exc[0] == errno.EOPNOTSUPP:
+ acl = None
+ elif exc[0] == errno.ENOENT:
log.Log("Warning: unable to read ACL from %s: %s"
% (repr(rp.path), exc), 3)
acl = None
@@ -391,8 +392,9 @@ def get_acl_lists_from_rp(rp):
if rp.isdir():
try: def_acl = posix1e.ACL(filedef=rp.path)
except IOError, exc:
- if exc[0] == errno.EOPNOTSUPP: def_acl = None
- if exc[0] == errno.ENOENT:
+ if exc[0] == errno.EOPNOTSUPP:
+ def_acl = None
+ elif exc[0] == errno.ENOENT:
log.Log("Warning: unable to read default ACL from %s: %s"
% (repr(rp.path), exc), 3)
def_acl = None