Commit 8579d079 authored by owsla's avatar owsla

Handle failed attempts to set the sticky bit


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@838 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent d5c8356c
New in v1.1.13 (????/??/??)
---------------------------
Gracefully handle situations where rdiff-backup tries to set the sticky
bit on non-directory files on systems that don't support that action.
Thanks to Jim Nasby for the bug report. (Andrew Ferguson)
Prevent the extended filenames / UTF-8 test from raising an exception
on broken CIFS configurations which transform some characters to '?'.
Problem reported by Luca Cappe. (Andrew Ferguson)
......
......@@ -829,7 +829,19 @@ class RPath(RORPath):
def chmod(self, permissions):
"""Wrapper around os.chmod"""
self.conn.os.chmod(self.path, permissions & Globals.permission_mask)
try:
self.conn.os.chmod(self.path, permissions & Globals.permission_mask)
except OSError, exc:
if exc[0] == errno.EFTYPE and not self.isdir():
# Some systems throw this error if try to set sticky bit
# on a non-directory. Remove sticky bit and try again.
log.Log("Unable to set permissions of %s to %o - trying again"
"without sticky bit (%o)" % (self.path, permissions,
permissions & 06777), 2)
self.conn.os.chmod(self.path, permissions
& 06777 & Globals.permission_mask)
else:
raise
self.data['perms'] = permissions
def settime(self, accesstime, modtime):
......
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