remove temp file in failure case
This commit is contained in:
parent
ed639c140d
commit
19a6227e6e
1 changed files with 1 additions and 0 deletions
|
@ -124,6 +124,7 @@ tryLock lockfile = trySideLock lockfile $ \sidelock -> do
|
|||
hClose h
|
||||
let failedlock st = do
|
||||
dropLock $ LockHandle tmp st sidelock
|
||||
nukeFile tmp
|
||||
return Nothing
|
||||
let tooklock st = return $ Just $ LockHandle lockfile' st sidelock
|
||||
ifM (linkToLock sidelock tmp lockfile')
|
||||
|
|
Loading…
Reference in a new issue