summaryrefslogtreecommitdiff
path: root/Utility/DirWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-06-09 14:18:58 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-06-09 14:18:58 -0400
commit59139af0514552cd05c006afeef6f2316b1cbda7 (patch)
treed772045589f2ba8e0637547ddc26a4f109c3a075 /Utility/DirWatcher.hs
parent600829080f98afdd02f7e04b6b66f8387fc565ca (diff)
disable closingTracked on OSX
Don't trust OSX FSEvents's eventFlagItemModified to be called when the last writer of a file closes it; apparently that sometimes does not happen, which prevented files from being quickly added. This commit was sponsored by John Peloquin on Patreon.
Diffstat (limited to 'Utility/DirWatcher.hs')
-rw-r--r--Utility/DirWatcher.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Utility/DirWatcher.hs b/Utility/DirWatcher.hs
index bde710626..892841f93 100644
--- a/Utility/DirWatcher.hs
+++ b/Utility/DirWatcher.hs
@@ -64,18 +64,18 @@ eventsCoalesce = error "eventsCoalesce not defined"
{- With inotify, file closing is tracked to some extent, so an add event
- will always be received for a file once its writer closes it, and
- (typically) not before. This may mean multiple add events for the same file.
- -
- - fsevents behaves similarly, although different event types are used for
- - creating and modification of the file.
-
- OTOH, with kqueue, add events will often be received while a file is
- still being written to, and then no add event will be received once the
- - writer closes it. -}
+ - writer closes it.
+ -
+ - fsevents sometimes behaves similarly, but has sometimes been
+ - seen to behave like kqueue. -}
closingTracked :: Bool
-#if (WITH_INOTIFY || WITH_FSEVENTS || WITH_WIN32NOTIFY)
+#if (WITH_INOTIFY || WITH_WIN32NOTIFY)
closingTracked = True
#else
-#if WITH_KQUEUE
+#if (WITH_KQUEUE || WITH_FSEVENTS)
closingTracked = False
#else
closingTracked = error "closingTracked not defined"