IO exception rework
ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
This commit is contained in:
parent
05f89123e0
commit
146c36ca54
14 changed files with 56 additions and 44 deletions
|
@ -16,7 +16,6 @@ module Backend (
|
|||
maybeLookupBackendName
|
||||
) where
|
||||
|
||||
import System.IO.Error (try)
|
||||
import System.Posix.Files
|
||||
|
||||
import Common.Annex
|
||||
|
@ -77,7 +76,7 @@ genKey' (b:bs) file = do
|
|||
- by examining what the file symlinks to. -}
|
||||
lookupFile :: FilePath -> Annex (Maybe (Key, Backend))
|
||||
lookupFile file = do
|
||||
tl <- liftIO $ try getsymlink
|
||||
tl <- liftIO $ tryIO getsymlink
|
||||
case tl of
|
||||
Left _ -> return Nothing
|
||||
Right l -> makekey l
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue