diff options
Diffstat (limited to 'Assistant/Threads/SanityChecker.hs')
-rw-r--r-- | Assistant/Threads/SanityChecker.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs index 148ae1435..f01b63de3 100644 --- a/Assistant/Threads/SanityChecker.hs +++ b/Assistant/Threads/SanityChecker.hs @@ -76,7 +76,7 @@ check :: ThreadState -> DaemonStatusHandle -> TransferQueue -> ChangeChan -> IO check st dstatus transferqueue changechan = do g <- runThreadState st $ fromRepo id -- Find old unstaged symlinks, and add them to git. - unstaged <- Git.LsFiles.notInRepo False ["."] g + (unstaged, cleanup) <- Git.LsFiles.notInRepo False ["."] g now <- getPOSIXTime forM_ unstaged $ \file -> do ms <- catchMaybeIO $ getSymbolicLinkStatus file @@ -85,6 +85,7 @@ check st dstatus transferqueue changechan = do | isSymbolicLink s -> addsymlink file ms _ -> noop + void cleanup return True where toonew timestamp now = now < (realToFrac (timestamp + slop) :: POSIXTime) |