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.
This commit is contained in:
Joey Hess 2013-12-09 16:56:15 -04:00
parent 51b43f2b68
commit 2066e90421

View file

@ -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 ()