diff options
Diffstat (limited to 'Upgrade')
-rw-r--r-- | Upgrade/V1.hs | 2 | ||||
-rw-r--r-- | Upgrade/V2.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index fe59ad3da..377e4b21b 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -179,7 +179,7 @@ writeLog1 :: FilePath -> [LogLine] -> IO () writeLog1 file ls = viaTmp writeFile file (showLog ls) readLog1 :: FilePath -> IO [LogLine] -readLog1 file = catch (parseLog <$> readFileStrict file) (const $ return []) +readLog1 file = catchDefaultIO (parseLog <$> readFileStrict file) [] lookupFile1 :: FilePath -> Annex (Maybe (Key, Backend Annex)) lookupFile1 file = do diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs index 7ef2a4d18..6a46ad8a1 100644 --- a/Upgrade/V2.hs +++ b/Upgrade/V2.hs @@ -69,7 +69,7 @@ locationLogs = do files <- mapM tryDirContents (concat levelb) return $ mapMaybe islogfile (concat files) where - tryDirContents d = catch (dirContents d) (return . const []) + tryDirContents d = catchDefaultIO (dirContents d) [] islogfile f = maybe Nothing (\k -> Just (k, f)) $ logFileKey $ takeFileName f |