summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-12 04:06:11 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-12 04:06:11 +0000
commit75708ee1b83e3b04b383a0340db91e1893378bf0 (patch)
treeed3ea9da52823bb9db9791af8cd5baecd8d5d38a
parent9eac1971803bc3e17ab1a13e4d825774290e0ef4 (diff)
downloadrdiff-backup-75708ee1b83e3b04b383a0340db91e1893378bf0.tar.gz
Avoid setting permissions to 000 because they're out of sync.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@822 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG2
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 8082cba..8472997 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,8 @@
New in v1.1.12 (????/??/??)
---------------------------
+Avoid setting permissions to 000 because they're out of sync. (Andrew Ferguson)
+
listxattr() can also throw EPERM error if not supported. (Andrew Ferguson)
Do something sensible if we get an IOError while trying to appropriately
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index 51b221b..a28efaa 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -1167,6 +1167,9 @@ class RPath(RORPath):
if self.hasfullperms(): oldperms = None
else:
oldperms = self.getperms()
+ if not oldperms: # self.data['perms'] is probably out of sync
+ self.setdata()
+ oldperms = self.getperms()
self.chmod(0700)
fd = os.open(self.path, os.O_RDWR)
if oldperms is not None: self.chmod(oldperms)