From 7dbcaff4f698c914f9307cb69e742983e3a1a4e1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Aug 2008 11:15:12 +0000 Subject: Report when directory modification time is later than last sync time as a possible cause of compare failure, just as we do with files. --- bin/bbackupquery/BackupQueries.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp index 1a183599..92bc5c42 100644 --- a/bin/bbackupquery/BackupQueries.cpp +++ b/bin/bbackupquery/BackupQueries.cpp @@ -1945,6 +1945,20 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const s "store directory '" << storePathDisplay << "' does not."); rParams.mDifferences ++; + + // Check the dir modification time + struct stat st; + if(::stat(localPath.c_str(), &st) == 0 && + FileModificationTime(st) > + rParams.mLatestFileUploadTime) + { + rParams.mDifferencesExplainedByModTime ++; + BOX_INFO("Local directory '" << + localPathDisplay << "' was " + "modified since the last sync, " + "might be reason for " + "difference"); + } } else { -- cgit v1.2.3