From c404828267cb61f6e32ab77c0ab7835140250912 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 14 Jul 2008 15:59:21 -0700 Subject: [PATCH] --rebuild-statcache bugfix. Check that a file is actually unchanged (and not just present in the old statcache with different metadata) before printing a warning about differing checksums. --- scandir.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scandir.cc b/scandir.cc index 10e908b..cde2835 100644 --- a/scandir.cc +++ b/scandir.cc @@ -294,7 +294,9 @@ int64_t dumpfile(int fd, dictionary &file_info, const string &path, // the checksum in the statcache. If not, we have possible disk corruption // and report a warning. if (flag_rebuild_statcache) { - if (found && file_info["checksum"] != metawriter->get_checksum()) { + if (found + && metawriter->is_unchanged(&stat_buf) + && file_info["checksum"] != metawriter->get_checksum()) { fprintf(stderr, "Warning: Checksum for %s does not match expected value\n" " expected: %s\n" -- 2.20.1