guard readSymbolicLink
throws an exception if the file is not a symlink
This commit is contained in:
parent
20fafc6a2d
commit
aedfcde969
2 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue