summaryrefslogtreecommitdiff
path: root/Command/Fix.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Fix.hs')
-rw-r--r--Command/Fix.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs
index 27c4b167e..f264106c3 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -23,12 +23,9 @@ seek = [withFilesInGit $ whenAnnexed start]
start :: FilePath -> (Key, Backend Annex) -> CommandStart
start file (key, _) = do
link <- calcGitLink file key
- l <- liftIO $ readSymbolicLink file
- if link == l
- then stop
- else do
- showStart "fix" file
- next $ perform file link
+ stopUnless ((/=) link <$> liftIO (readSymbolicLink file)) $ do
+ showStart "fix" file
+ next $ perform file link
perform :: FilePath -> FilePath -> CommandPerform
perform file link = do