From a41f18f654feaea3dfab6955df177e9956823ea2 Mon Sep 17 00:00:00 2001 From: bescoto Date: Wed, 28 Jan 2004 06:35:37 +0000 Subject: Couple small changes to fs_abilities git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@507 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/fs_abilities.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rdiff-backup/rdiff_backup/fs_abilities.py') 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 " -- cgit v1.2.1