summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-05 16:07:27 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-05 16:07:27 -0400
commit24d0821f6215fd1e93d97c597f727ab51329f727 (patch)
tree15730d3c38ff882acc1edf7e3fe706d8f0afc4bf /Command
parent9c9d97b094b32e36dd0c7a86329adea830267453 (diff)
guard readSymbolicLink
throws an exception if the file is not a symlink
Diffstat (limited to 'Command')
-rw-r--r--Command/Fix.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs
index 4b0151342..e15951c21 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -23,7 +23,7 @@ seek = [withFilesInGit $ whenAnnexed start]
start :: FilePath -> (Key, Backend) -> CommandStart
start file (key, _) = do
link <- calcGitLink file key
- stopUnless ((/=) link <$> liftIO (readSymbolicLink file)) $ do
+ stopUnless ((/=) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) $ do
showStart "fix" file
next $ perform file link