summaryrefslogtreecommitdiff
path: root/Logs/Unused.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Logs/Unused.hs')
-rw-r--r--Logs/Unused.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs
index d26d37dca..cadf7ed9d 100644
--- a/Logs/Unused.hs
+++ b/Logs/Unused.hs
@@ -67,7 +67,7 @@ updateUnusedLog prefix m = do
writeUnusedLog :: FilePath -> UnusedLog -> Annex ()
writeUnusedLog prefix l = do
logfile <- fromRepo $ gitAnnexUnusedLog prefix
- liftIO $ viaTmp writeFile logfile $ unlines $ map format $ M.toList l
+ liftIO $ viaTmp writeFileAnyEncoding logfile $ unlines $ map format $ M.toList l
where
format (k, (i, Just t)) = show i ++ " " ++ key2file k ++ " " ++ show t
format (k, (i, Nothing)) = show i ++ " " ++ key2file k
@@ -77,7 +77,7 @@ readUnusedLog prefix = do
f <- fromRepo $ gitAnnexUnusedLog prefix
ifM (liftIO $ doesFileExist f)
( M.fromList . mapMaybe parse . lines
- <$> liftIO (readFile f)
+ <$> liftIO (readFileStrictAnyEncoding f)
, return M.empty
)
where
@@ -99,7 +99,6 @@ dateUnusedLog prefix = do
f <- fromRepo $ gitAnnexUnusedLog prefix
liftIO $ catchMaybeIO $ getModificationTime f
#else
-#warning foo
-- old ghc's getModificationTime returned a ClockTime
dateUnusedLog _prefix = return Nothing
#endif