more lambda-case conversion

This commit is contained in:
Joey Hess 2017-12-05 15:00:50 -04:00
parent 936d50310d
commit fc845e6530
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
29 changed files with 137 additions and 199 deletions

View file

@ -55,11 +55,10 @@ getAnnexLinkTarget' file coresymlinks = if coresymlinks
check probefilecontent $
return Nothing
where
check getlinktarget fallback = do
v <- liftIO $ catchMaybeIO $ getlinktarget file
case v of
check getlinktarget fallback =
liftIO (catchMaybeIO $ getlinktarget file) >>= \case
Just l
| isLinkToAnnex (fromInternalGitPath l) -> return v
| isLinkToAnnex (fromInternalGitPath l) -> return (Just l)
| otherwise -> return Nothing
Nothing -> fallback