summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Watcher.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/Watcher.hs')
-rw-r--r--Assistant/Threads/Watcher.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index f7e4e2df2..08689cca4 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -24,6 +24,7 @@ import Assistant.Drop
import Logs.Transfer
import Utility.DirWatcher
import Utility.Types.DirWatcher
+import Utility.Lsof
import qualified Annex
import qualified Annex.Queue
import qualified Git.Command
@@ -39,7 +40,8 @@ import qualified Data.ByteString.Lazy as L
checkCanWatch :: Annex ()
checkCanWatch
- | canWatch =
+ | canWatch = do
+ liftIO setupLsof
unlessM (liftIO (inPath "lsof") <||> Annex.getState Annex.force)
needLsof
| otherwise = error "watch mode is not available on this system"