Commit e8a09645 authored by bescoto's avatar bescoto

Couple small changes to fs_abilities


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@507 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6316d6c4
......@@ -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 "
......
......@@ -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
......
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