wip
This commit is contained in:
parent
bbfe4eafd7
commit
eb86f1338f
3 changed files with 13 additions and 1 deletions
|
@ -124,7 +124,16 @@ inAnnexSafe key = inAnnex' (fromMaybe False) (Just False) go key
|
|||
Nothing -> is_unlocked
|
||||
check def Nothing = return def
|
||||
#else
|
||||
checkindirect _ = return is_missing
|
||||
checkindirect f = ifM (liftIO $ doesFileExist f)
|
||||
( do
|
||||
v <- lockShared f
|
||||
case v of
|
||||
Nothing -> return is_locked
|
||||
Just lockhandle -> do
|
||||
dropLock lockhandle
|
||||
return is_unlocked
|
||||
, return is_missing
|
||||
)
|
||||
{- In Windows, see if we can take a shared lock. If so,
|
||||
- remove the lock file to clean up after ourselves. -}
|
||||
checkdirect contentfile lockfile =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue