From: Michael Vrable Date: Mon, 14 Jul 2008 22:59:21 +0000 (-0700) Subject: --rebuild-statcache bugfix. X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=commitdiff_plain;h=c404828267cb61f6e32ab77c0ab7835140250912 --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. --- 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"