From 1753f8c9bdbfdfcbee3e63a6ca0ecfc81c6444ef Mon Sep 17 00:00:00 2001 From: Martin Karlgren <marty@roxen.com> Date: Wed, 28 Mar 2018 14:34:37 +0200 Subject: [PATCH] Filesystem.Monitor: Only multiply by file_interval_factor when path isn't a dir for sure. Previously monitors on non-existing paths could get very long poll intervals, which led to unexpected effects in Inotify mode, where the scan time typically is high but Inotify isn't able to watch the non-existing path. --- lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike b/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike index ca65ab6ba2..a45aa158b9 100644 --- a/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike +++ b/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike @@ -479,7 +479,7 @@ protected class Monitor(string path, int delta = max_dir_check_interval || global::max_dir_check_interval; this::st = st; - if (!st || !st->isdir) { + if (st && !st->isdir) { delta *= file_interval_factor || global::file_interval_factor; } -- GitLab