summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 7022364d0..c5771af28 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -98,7 +98,7 @@ lockContent key a = do
case v of
Left _ -> error "content is locked"
Right _ -> return $ Just fd
- unlock Nothing = return ()
+ unlock Nothing = noop
unlock (Just l) = closeFd l
{- Calculates the relative path to use to link a file to a key. -}
@@ -237,10 +237,10 @@ cleanObjectLoc key = do
file <- inRepo $ gitAnnexLocation key
liftIO $ removeparents file (3 :: Int)
where
- removeparents _ 0 = return ()
+ removeparents _ 0 = noop
removeparents file n = do
let dir = parentDir file
- maybe (return ()) (const $ removeparents dir (n-1))
+ maybe noop (const $ removeparents dir (n-1))
=<< catchMaybeIO (removeDirectory dir)
{- Removes a key's file from .git/annex/objects/ -}