diff --git a/src/main.d b/src/main.d index 7de18af7..bf88b65b 100644 --- a/src/main.d +++ b/src/main.d @@ -858,7 +858,15 @@ int main(string[] args) } auto currTime = MonoTime.currTime(); - if (currTime - lastCheckTime > checkInterval) { + // has monitor_interval elapsed or are we at application startup / monitor startup? + // in a --resync scenario, if we have not 're-populated' the database, valid changes will get skipped: + // Monitor directory: ./target + // Monitor directory: target/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby + // [M] Item moved: random_files/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby -> target/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby + // Moving random_files/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby to target/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby + // Skipping uploading this new file as parent path is not in the database: target/2eVPInOMTFNXzRXeNMEoJch5OR9XpGby + // 'target' should be in the DB, it should also exist online, but because of --resync, it does not exist in the database thus parent check fails + if ((currTime - lastCheckTime > checkInterval) || (monitorLoopFullCount == 0)) { // monitor sync loop logOutputMessage = "################################################## NEW LOOP ##################################################"; if (displaySyncOptions) {