summaryrefslogtreecommitdiff
path: root/Assistant/Threads/SanityChecker.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-04 19:56:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-04 19:56:32 -0400
commitcd699ff50b8434b52e2f51d06414e8431b407482 (patch)
tree77291f6d6f6c340c41f9da5b3bbfeae4117d7764 /Assistant/Threads/SanityChecker.hs
parentbdbfe36e945e97d66c965bc7227d1457372bce32 (diff)
fix last zombies in the assistant
Made Git.LsFiles return cleanup actions, and everything waits on processes now, except of course for Seek.
Diffstat (limited to 'Assistant/Threads/SanityChecker.hs')
-rw-r--r--Assistant/Threads/SanityChecker.hs3
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)