mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-23 16:12:12 +02:00
Perform initial sync at startup in monitor mode (#946)
* If starting the application up, dont wait for monitor_interval to elapse before first sync attempt
This commit is contained in:
parent
df361b261b
commit
203da2dfb8
10
src/main.d
10
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) {
|
||||
|
|
Loading…
Reference in a new issue