Avoid encoding errors when using the unused log file.
This commit is contained in:
parent
f8112d82f2
commit
b7eb1d834a
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue