diff options
author | joshn <joshn@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2009-10-01 01:09:09 +0000 |
---|---|---|
committer | joshn <joshn@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2009-10-01 01:09:09 +0000 |
commit | 4af0618d37c526ae1becb3916eab61c70084ee63 (patch) | |
tree | 25f2f4109e4acbea8ffc697a106336e860e4ff26 | |
parent | e06d52eeb71a6884a44cfab79c215c7fed04b533 (diff) | |
download | rdiff-backup-4af0618d37c526ae1becb3916eab61c70084ee63.tar.gz |
Fix exception in win_acls.py when backing up Windows -> Linux.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1059 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r-- | rdiff-backup/rdiff_backup/win_acls.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/win_acls.py b/rdiff-backup/rdiff_backup/win_acls.py index 41a3f6b..f93488a 100644 --- a/rdiff-backup/rdiff_backup/win_acls.py +++ b/rdiff-backup/rdiff_backup/win_acls.py @@ -28,6 +28,8 @@ except ImportError: OWNER_SECURITY_INFORMATION = 0 DACL_SECURITY_INFORMATION = 0 + pywintypes = None + def encode(str_): if type(str_) == unicode: return str_.encode('utf-8') @@ -46,6 +48,12 @@ class ACL: def load_from_rp(self, rp, skip_inherit_only = True): self.index = rp.index + + # Sometimes, we are asked to load from an rpath when ACL's + # are not supported. Ignore the request in this case. + if not pywintypes: + return + try: sd = rp.conn.win32security. \ GetNamedSecurityInfo(rp.path, SE_FILE_OBJECT, ACL.flags) |