diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-30 16:32:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-30 16:32:32 -0400 |
commit | b2e359a15d20d2b2b13a1883b451d014ae60db7c (patch) | |
tree | 32cde5030a8cd8ac22c0af7df20250280f22a760 /Assistant/Threads/Watcher.hs | |
parent | 453b185c8506e4a6a030788f42eec196386ac78e (diff) |
fix kqueue build
Diffstat (limited to 'Assistant/Threads/Watcher.hs')
-rw-r--r-- | Assistant/Threads/Watcher.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index bfeec7630..51dc57263 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -72,11 +72,11 @@ watchThread st dstatus transferqueue changechan = do } {- Initial scartup scan. The action should return once the scan is complete. -} -startupScan :: ThreadState -> DaemonStatusHandle -> IO a -> IO () +startupScan :: ThreadState -> DaemonStatusHandle -> IO a -> IO a startupScan st dstatus scanner = do runThreadState st $ showAction "scanning" - void $ alertWhile dstatus startupScanAlert $ do - void $ scanner + r <- alertWhile' dstatus startupScanAlert $ do + r <- scanner -- Notice any files that were deleted before -- watching was started. @@ -85,10 +85,13 @@ startupScan st dstatus scanner = do showAction "started" modifyDaemonStatus_ dstatus $ \s -> s { scanComplete = True } - return True + + return (True, r) void $ addAlert dstatus runningAlert + return r + ignored :: FilePath -> Bool ignored = ig . takeFileName where |