diff options
-rw-r--r-- | Logs/Unused.hs | 4 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs index b96143c07..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 diff --git a/debian/changelog b/debian/changelog index 60c6f1030..c73c83f6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ git-annex (5.20140307) UNRELEASED; urgency=medium * Better workaround for problem umasks when eg, setting up ssh keys. * "standard" can now be used as a first-class keyword in preferred content expressions. For example "standard or (include=otherdir/*)" + * Avoid encoding errors when using the unused log file. -- Joey Hess <joeyh@debian.org> Thu, 06 Mar 2014 16:17:01 -0400 |