diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
commit | ed79596b758935a3f22bf6803bc082a6bbe10f58 (patch) | |
tree | 885a8a50e68dafb39ec886cb31aa4c549fbeb35e /Annex/LockPool.hs | |
parent | bee420bd2d0cbe16489b061b208083e2b8ba9d0e (diff) |
noop
Diffstat (limited to 'Annex/LockPool.hs')
-rw-r--r-- | Annex/LockPool.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Annex/LockPool.hs b/Annex/LockPool.hs index 3eb1363ee..b99a8ec4d 100644 --- a/Annex/LockPool.hs +++ b/Annex/LockPool.hs @@ -18,7 +18,7 @@ import Annex.Perms lockFile :: FilePath -> Annex () lockFile file = go =<< fromPool file where - go (Just _) = return () -- already locked + go (Just _) = noop -- already locked go Nothing = do mode <- annexFileMode fd <- liftIO $ noUmask mode $ @@ -27,10 +27,9 @@ lockFile file = go =<< fromPool file changePool $ M.insert file fd unlockFile :: FilePath -> Annex () -unlockFile file = go =<< fromPool file +unlockFile file = maybe noop go =<< fromPool file where - go Nothing = return () - go (Just fd) = do + go fd = do liftIO $ closeFd fd changePool $ M.delete file |