diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-13 00:57:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-13 00:57:52 -0400 |
commit | df337bb63b4ed6e5d2ce563ec89d28d192e791db (patch) | |
tree | 638813a415727b8a5441ba450e20e6dc2632c970 /Assistant/Threads/Watcher.hs | |
parent | a3913f52e52777b18bd8e50ff593a4f4085e8b93 (diff) |
hlint
Diffstat (limited to 'Assistant/Threads/Watcher.hs')
-rw-r--r-- | Assistant/Threads/Watcher.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 3054c50e1..17ec0b81f 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -44,7 +44,7 @@ thisThread = "Watcher" checkCanWatch :: Annex () checkCanWatch | canWatch = - unlessM (liftIO (inPath "lsof") <||> Annex.getState Annex.force) $ + unlessM (liftIO (inPath "lsof") <||> Annex.getState Annex.force) needLsof | otherwise = error "watch mode is not available on this system" @@ -75,7 +75,7 @@ watchThread st dstatus transferqueue changechan = NamedThread thisThread $ do startupScan :: ThreadState -> DaemonStatusHandle -> IO a -> IO a startupScan st dstatus scanner = do runThreadState st $ showAction "scanning" - r <- alertWhile' dstatus startupScanAlert $ do + alertWhile' dstatus startupScanAlert $ do r <- scanner -- Notice any files that were deleted before @@ -88,8 +88,6 @@ startupScan st dstatus scanner = do return (True, r) - return r - ignored :: FilePath -> Bool ignored = ig . takeFileName where @@ -135,7 +133,7 @@ runHandler threadname st dstatus transferqueue changechan handler file filestatu -} onAdd :: Handler onAdd threadname file filestatus dstatus _ - | maybe False isRegularFile filestatus = do + | maybe False isRegularFile filestatus = ifM (scanComplete <$> liftIO (getDaemonStatus dstatus)) ( go , ifM (null <$> inRepo (Git.LsFiles.notInRepo False [file])) |