From cdb47af26e621d15ade0a488597d9a228d4d430e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 29 Dec 2012 14:58:13 -0400 Subject: avoid double commits with inotify when direct mode file is created --- Assistant/Threads/Watcher.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Assistant') diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index a69ab6a09..1c5d7206b 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -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 -- cgit v1.2.3