diff options
author | 2013-04-24 21:20:29 -0400 | |
---|---|---|
committer | 2013-04-24 21:20:29 -0400 | |
commit | d5b88303c12b0897af4bc21500ed168f52e64322 (patch) | |
tree | cb296cd3dd569245af10a87c8368abb37733eab7 /Assistant/Threads | |
parent | 76bef32b5e6c84183d8974f91749592a3ada8c9d (diff) |
optimise direct mode startup scan
A recent change made existing symlinks be re-staged. That does not need to
be done during the startup scan though.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/Watcher.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 58c4c2e30..88efa39d8 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -203,9 +203,12 @@ onAddDirect symlinkssupported matcher file fs = do - really modified, but it might have - just been deleted and been put back, - so it symlink is restaged to make sure. -} - ( do - link <- liftAnnex $ inRepo $ gitAnnexLink file key - addLink file link (Just key) + ( ifM (scanComplete <$> getDaemonStatus) + ( do + link <- liftAnnex $ inRepo $ gitAnnexLink file key + addLink file link (Just key) + , noChange + ) , guardSymlinkStandin (Just key) $ do debug ["changed direct", file] liftAnnex $ changedDirect key file |