diff options
Diffstat (limited to 'Upgrade/V1.hs')
-rw-r--r-- | Upgrade/V1.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index b4567a0b7..9c3fd9959 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -11,6 +11,7 @@ import System.IO.Error (try) import System.Directory import Control.Monad.State (liftIO) import Control.Monad (filterM, forM_, unless) +import Control.Applicative import System.Posix.Files import System.FilePath import Data.String.Utils @@ -192,7 +193,7 @@ writeLog1 :: FilePath -> [LogLine] -> IO () writeLog1 file ls = viaTmp writeFile file (unlines $ map show ls) readLog1 :: FilePath -> IO [LogLine] -readLog1 file = catch (return . parseLog =<< readFileStrict file) (const $ return []) +readLog1 file = catch (parseLog <$> readFileStrict file) (const $ return []) lookupFile1 :: FilePath -> Annex (Maybe (Key, Backend Annex)) lookupFile1 file = do @@ -201,7 +202,7 @@ lookupFile1 file = do Left _ -> return Nothing Right l -> makekey l where - getsymlink = return . takeFileName =<< readSymbolicLink file + getsymlink = takeFileName <$> readSymbolicLink file makekey l = case maybeLookupBackendName bname of Nothing -> do unless (null kname || null bname || |