From 2066e904219b320173ce9e02bc72687f4b910b5b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Dec 2013 16:56:15 -0400 Subject: [PATCH] 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. --- Assistant/Threads/Watcher.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 6a56eadbbd..d9afb9adfd 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 ()