Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2019-02-08 11:57:11 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:58:36 +0300
commit4d58208676f3a2234d1c051c53775f8031560681 (patch)
treee10692495c86d7ef877c31cd6e488f4af521c465 /src/cmd
parent539cef345ef18262b2533a16e0850ec6d92fde37 (diff)
File watcher: Reduce touch ignore duration
On Linux and Windows the file watcher can't distinguish between changes that were caused by the process itself, like during a sync operation, and external changes. To work around that the client keeps a list of files it has touched and blocks notifications on these files for a bit. The duration of this block was originally and arbitrarily set at 15 seconds. During manual tests I regularly thought there was a bug when syncs didn't trigger, when the only problem was that my changes happened too close to a previous sync operation. This change reduces the duration to three seconds. I imagine that this is still enough. Also use std::chrono while at it.
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp
index 41d89f62b..bb6365aa2 100644
--- a/src/cmd/cmd.cpp
+++ b/src/cmd/cmd.cpp
@@ -497,7 +497,7 @@ int main(int argc, char **argv)
}
// much lower age than the default since this utility is usually made to be run right after a change in the tests
- SyncEngine::minimumFileAgeForUpload = 0;
+ SyncEngine::minimumFileAgeForUpload = std::chrono::milliseconds(0);
int restartCount = 0;
restart_sync: