summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-01-28 06:35:37 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-01-28 06:35:37 +0000
commita41f18f654feaea3dfab6955df177e9956823ea2 (patch)
treec1124ee35dac80dad22f46b20ff252eb6f38cff5
parent16d23ad090f0b3548fd669fa07278266396b3dea (diff)
downloadrdiff-backup-a41f18f654feaea3dfab6955df177e9956823ea2.tar.gz
Couple small changes to fs_abilities
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@507 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/fs_abilities.py5
-rw-r--r--rdiff-backup/testing/fs_abilitiestest.py6
2 files changed, 7 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py
index 20b85fd..39d4de9 100644
--- a/rdiff-backup/rdiff_backup/fs_abilities.py
+++ b/rdiff-backup/rdiff_backup/fs_abilities.py
@@ -187,7 +187,7 @@ rdiff-backup-data/chars_to_quote.
tmp_rp.chown(uid+1, gid+1) # just choose random uid/gid
tmp_rp.chown(0, 0)
except (IOError, OSError), exc:
- if exc[0] == errno.EPERM:
+ if exc[0] in (errno.EPERM, errno.EINVAL):
log.Log("Warning: ownership cannot be changed on filesystem "
"at %s" % (self.root_rp.path,), 3)
self.ownership = 0
@@ -202,7 +202,8 @@ rdiff-backup-data/chars_to_quote.
hl_source.touch()
try:
hl_dest.hardlink(hl_source.path)
- assert hl_source.getinode() == hl_dest.getinode()
+ if hl_source.getinode() != hl_dest.getinode():
+ raise IOError(errno.EOPNOTSUP, "Hard links don't compare")
except (IOError, OSError), exc:
if exc[0] in (errno.EOPNOTSUPP, errno.EPERM):
log.Log("Warning: hard linking not supported by filesystem "
diff --git a/rdiff-backup/testing/fs_abilitiestest.py b/rdiff-backup/testing/fs_abilitiestest.py
index cdbe75e..93f17c4 100644
--- a/rdiff-backup/testing/fs_abilitiestest.py
+++ b/rdiff-backup/testing/fs_abilitiestest.py
@@ -11,15 +11,17 @@ class FSAbilitiesTest(unittest.TestCase):
the expected values below.
"""
- # Describes standard linux file system with acls/eas
+ # Describes standard linux file system without acls/eas
dir_to_test = "testfiles"
- eas = acls = 1
+ eas = acls = 0
chars_to_quote = ""
ownership = (os.getuid() == 0)
hardlinks = fsync_dirs = 1
dir_inc_perms = 1
resource_forks = 0
+
+
# Describes MS-Windows style file system
#dir_to_test = "/mnt/fat"
#eas = acls = 0