summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-09 16:56:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-09 16:56:15 -0400
commit48383762f90630d9bad27bf9e165e3fb1f90af82 (patch)
tree1f3a23b91ea2135158ceaeae74ec28d4eb6d7b36 /Assistant/Threads
parent3353b038b5cf4321bc3359a783293f69ca779574 (diff)
avoid needing --force on windows despite no lsof
Note that I still need to think this through and make sure handling of open files is safe. This is just for testing purposes.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/Watcher.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index 6a56eadbb..d9afb9adf 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -50,9 +50,13 @@ import Data.Time.Clock
checkCanWatch :: Annex ()
checkCanWatch
| canWatch = do
+#ifndef mingw32_HOST_OS
liftIO Lsof.setup
unlessM (liftIO (inPath "lsof") <||> Annex.getState Annex.force)
needLsof
+#else
+ noop
+#endif
| otherwise = error "watch mode is not available on this system"
needLsof :: Annex ()