diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2006-01-15 03:07:56 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2006-01-15 03:07:56 +0000 |
commit | 0ab7cdf3da5b1bc3f2e3027b05018ae0670375b7 (patch) | |
tree | 26f885bad80abf4603edc33657a1b74c32e373ee /rdiff-backup/rdiff_backup | |
parent | a5354311095be9d40989ea4fa33d0290d4d9da39 (diff) | |
download | rdiff-backup-0ab7cdf3da5b1bc3f2e3027b05018ae0670375b7.tar.gz |
SpecialFileError shouldn't trigger UpdateError
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@747 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup')
-rw-r--r-- | rdiff-backup/rdiff_backup/backup.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py index 181c918..7d24eb7 100644 --- a/rdiff-backup/rdiff_backup/backup.py +++ b/rdiff-backup/rdiff_backup/backup.py @@ -533,8 +533,9 @@ class PatchITRB(rorpiter.ITRBranch): if diff_rorp.isflaglinked(): self.patch_hardlink_to_temp(diff_rorp, new) elif diff_rorp.get_attached_filetype() == 'snapshot': - if not self.patch_snapshot_to_temp(diff_rorp, new): - return 0 + result = self.patch_snapshot_to_temp(diff_rorp, new) + if not result: return 0 + elif result == 2: return 1 # SpecialFile elif not self.patch_diff_to_temp(basis_rp, diff_rorp, new): return 0 if new.lstat() and not diff_rorp.isflaglinked(): @@ -547,11 +548,18 @@ class PatchITRB(rorpiter.ITRBranch): self.CCPP.update_hardlink_hash(diff_rorp) def patch_snapshot_to_temp(self, diff_rorp, new): - """Write diff_rorp to new, return true if successful""" + """Write diff_rorp to new, return true if successful + + Returns 1 if normal success, 2 if special file is written, + whether or not it is successful. This is because special + files either fail with a SpecialFileError, or don't need to be + compared. + + """ if diff_rorp.isspecial(): self.write_special(diff_rorp, new) rpath.copy_attribs(diff_rorp, new) - return 1 + return 2 report = robust.check_common_error(self.error_handler, rpath.copy, (diff_rorp, new)) |