diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-25 22:35:48 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-11-25 22:35:48 +0000 |
commit | 2618c4533f2e4e7f3c407adaf7874d2bb0a4bde5 (patch) | |
tree | 24bf2ca2a72ea7b1f8a25f0ddefda2d2ae5ed189 | |
parent | 4f008bb4653629b2bec6d3202d413f7c02b0fcb0 (diff) | |
download | rdiff-backup-2618c4533f2e4e7f3c407adaf7874d2bb0a4bde5.tar.gz |
Fixed a few verify/compare errors caused by longname code
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@690 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r-- | rdiff-backup/TODO | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/compare.py | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index d3b1a21..1ae8741 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,3 +1,7 @@ +Only warn, not abort, when get undefined metadata field + +Fix restore with --force over existing regular file. + For comparing, check source filesystem's abilities Clean up compare reports diff --git a/rdiff-backup/rdiff_backup/compare.py b/rdiff-backup/rdiff_backup/compare.py index 0679b22..892cf75 100644 --- a/rdiff-backup/rdiff_backup/compare.py +++ b/rdiff-backup/rdiff_backup/compare.py @@ -84,7 +84,7 @@ def Verify(mirror_rp, inc_rp, verify_time): "perhaps because these feature was added in v1.1.1" % (repo_rorp.get_indexpath(),), 2) continue - fp = RepoSide.rf_cache.get_fp(base_index + repo_rorp.index) + fp = RepoSide.rf_cache.get_fp(base_index + repo_rorp.index, repo_rorp) computed_hash = hash.compute_sha1_fp(fp) if computed_hash == repo_rorp.get_sha1(): log.Log("Verified SHA1 digest of " + repo_rorp.get_indexpath(), 5) @@ -174,7 +174,8 @@ class RepoSide(restore.MirrorStruct): continue # They must be equal, nothing else to check if (src_rorp.isreg() and mir_rorp.isreg() and src_rorp.getsize() == mir_rorp.getsize()): - mir_rorp.setfile(cls.rf_cache.get_fp(base_index + index)) + fp = cls.rf_cache.get_fp(base_index + index, mir_rorp) + mir_rorp.setfile(fp) mir_rorp.set_attached_filetype('snapshot') if mir_rorp: yield mir_rorp @@ -199,7 +200,7 @@ class DataSide(backup.SourceStruct): """Return 0 if their data hashes same, 1 otherwise""" if not mir_rorp.has_sha1(): log.Log("Warning: Metadata file has no digest for %s, " - "unable to compare." % (index,), 2) + "unable to compare." % (mir_rorp.get_indexpath(),), 2) return 0 elif (src_rp.getsize() == mir_rorp.getsize() and hash.compute_sha1(src_rp) == mir_rorp.get_sha1()): |