summaryrefslogtreecommitdiff
path: root/Command/Fix.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:02:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:02:46 -0400
commit56bc3e95cabb85e5f23e30b453f90438c33efbb8 (patch)
treec13ac69cfc2b5ba9582aa5c1ebd427bc0d337b16 /Command/Fix.hs
parentb400984ddf9aeb24c3d67e87cfeb29470618636c (diff)
refactor some boilerplate
Diffstat (limited to 'Command/Fix.hs')
-rw-r--r--Command/Fix.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs
index d898ce517..60627e9df 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -30,17 +30,17 @@ start file = isAnnexed file $ \(key, _) -> do
link <- calcGitLink file key
l <- liftIO $ readSymbolicLink file
if link == l
- then return Nothing
+ then stop
else do
showStart "fix" file
- return $ Just $ perform file link
+ next $ perform file link
perform :: FilePath -> FilePath -> CommandPerform
perform file link = do
liftIO $ createDirectoryIfMissing True (parentDir file)
liftIO $ removeFile file
liftIO $ createSymbolicLink link file
- return $ Just $ cleanup file
+ next $ cleanup file
cleanup :: FilePath -> CommandCleanup
cleanup file = do