avoid double commits with inotify when direct mode file is created
This commit is contained in:
parent
e872c3f648
commit
8cc27b8afc
2 changed files with 7 additions and 3 deletions
|
@ -69,7 +69,6 @@ watchThread = NamedThread "Watcher" $ do
|
|||
errhook <- hook onErr
|
||||
let hooks = mkWatchHooks
|
||||
{ addHook = addhook
|
||||
, modifyHook = addhook
|
||||
, delHook = delhook
|
||||
, addSymlinkHook = addsymlinkhook
|
||||
, delDirHook = deldirhook
|
||||
|
@ -143,10 +142,10 @@ onAddDirect file fs = do
|
|||
case (v, fs) of
|
||||
(Just key, Just filestatus) ->
|
||||
ifM (liftAnnex $ changedFileStatus key filestatus)
|
||||
( noChange
|
||||
, do
|
||||
( do
|
||||
liftAnnex $ changedDirect key file
|
||||
pendingAddChange file
|
||||
, noChange
|
||||
)
|
||||
_ -> pendingAddChange file
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue