summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-08-13 16:11:15 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-08-13 16:11:15 +0000
commit860233cf1d2a0a48f80e9024457731e694e2184a (patch)
tree1436dbdf7c36976550771c69c6ed96041ad0b554
parent614967990e00c6927d41f91e98e75905ce181086 (diff)
downloadrdiff-backup-860233cf1d2a0a48f80e9024457731e694e2184a.tar.gz
More robust workaround for EFTYPE only being present on BSD
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@847 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index fe5277f..d6f3655 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -832,8 +832,8 @@ class RPath(RORPath):
try:
self.conn.os.chmod(self.path, permissions & Globals.permission_mask)
except OSError, e:
- # XXX: BSD defines EFTYPE as 79, but it is not in python
- if e.errno == 79 and not self.isdir():
+ if e.strerror == "Inappropriate file type or format" \
+ 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"