diff options
-rw-r--r-- | rdiff-backup/rdiff_backup/fs_abilities.py | 5 | ||||
-rw-r--r-- | rdiff-backup/testing/fs_abilitiestest.py | 6 |
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 |