From 56bc3e95cabb85e5f23e30b453f90438c33efbb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 May 2011 02:02:46 -0400 Subject: refactor some boilerplate --- Command/Fix.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Command/Fix.hs') 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 -- cgit v1.2.3