Commit 63eef9e7 authored by owsla's avatar owsla

Try chmod'ing again if we can't open a file -- let's rdiff-backup work

better in some AFS and NFS installs.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@878 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 1ede89f3
New in v1.1.16 (????/??/??)
---------------------------
Don't give up right away if we can't open a file. Try chmod'ing it even
if we aren't root or don't own it, since that can sometimes work on AFS
and NFS. Closes Savannah bug #21202. (Andrew Ferguson)
Correctly handle updates to nested directories with unreadable permissions.
Thanks to John Goerzen for the bug report. Closes Debian bugs #389134 and
#411849. (Andrew Ferguson)
......
......@@ -212,7 +212,14 @@ class DestinationStruct:
return Rdiff.get_signature(dest_rp)
except IOError, e:
if (e.errno == errno.EPERM):
log.Log.FatalError("Could not open %s for reading. Check "
try:
# Try chmod'ing anyway -- This can work on NFS and AFS
# depending on the setup. We keep the if() statement
# above for performance reasons.
dest_rp.chmod(0400 | dest_rp.getperms())
return Rdiff.get_signature(dest_rp)
except (IOError, OSError):
log.Log.FatalError("Could not open %s for reading. Check "
"permissions on file." % (dest_rp.path,))
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