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.
This commit is contained in:
parent
a20d8ed4cc
commit
1426f7ff3a
4 changed files with 58 additions and 6 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue