assistant adding of modified files in direct mode
Works with inotify, but I think in kqueue we don't get events existing files that get modified.
This commit is contained in:
parent
95db595e91
commit
cc5140d295
2 changed files with 10 additions and 5 deletions
|
@ -147,7 +147,10 @@ delayaddDefault = Nothing
|
|||
handleAdds :: Maybe Seconds -> [Change] -> Assistant [Change]
|
||||
handleAdds delayadd cs = returnWhen (null incomplete) $ do
|
||||
let (pending, inprocess) = partition isPendingAddChange incomplete
|
||||
pending' <- findnew pending
|
||||
direct <- liftAnnex isDirect
|
||||
pending' <- if direct
|
||||
then return pending
|
||||
else findnew pending
|
||||
(postponed, toadd) <- partitionEithers <$> safeToAdd delayadd pending' inprocess
|
||||
|
||||
unless (null postponed) $
|
||||
|
@ -155,7 +158,6 @@ handleAdds delayadd cs = returnWhen (null incomplete) $ do
|
|||
|
||||
returnWhen (null toadd) $ do
|
||||
added <- catMaybes <$> forM toadd add
|
||||
direct <- liftAnnex isDirect
|
||||
if DirWatcher.eventsCoalesce || null added || direct
|
||||
then return $ added ++ otherchanges
|
||||
else do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue