From 75708ee1b83e3b04b383a0340db91e1893378bf0 Mon Sep 17 00:00:00 2001 From: owsla Date: Thu, 12 Jul 2007 04:06:11 +0000 Subject: 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 --- rdiff-backup/CHANGELOG | 2 ++ rdiff-backup/rdiff_backup/rpath.py | 3 +++ 2 files changed, 5 insertions(+) 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) -- cgit v1.2.1