diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:15:12 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:15:12 +0000 |
commit | 7dbcaff4f698c914f9307cb69e742983e3a1a4e1 (patch) | |
tree | 035870de356b511060cf28f3a7ff0c6d0a2cd25d /bin/bbackupquery/BackupQueries.cpp | |
parent | c65bbcc2c29c30e2fa755059e48d07a07f6b4c07 (diff) |
Report when directory modification time is later than last sync time as
a possible cause of compare failure, just as we do with files.
Diffstat (limited to 'bin/bbackupquery/BackupQueries.cpp')
-rw-r--r-- | bin/bbackupquery/BackupQueries.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 { |