fsck: Work around bug in persistent that broke display of problematically encoded filenames on stderr when using --incremental.

This commit is contained in:
Joey Hess 2015-09-09 17:02:00 -04:00
parent 1fcca1b43b
commit 4ed82e5328
5 changed files with 36 additions and 3 deletions

View file

@ -31,6 +31,7 @@ import Types.Key
import Types.UUID
import Annex.Perms
import Annex.LockFile
import Messages
import Database.Persist.TH
import Database.Esqueleto hiding (Key)
@ -77,6 +78,10 @@ openDb u = do
rename tmpdbdir dbdir
lockFileCached =<< fromRepo (gitAnnexFsckDbLock u)
h <- liftIO $ H.openDb db "fscked"
-- work around https://github.com/yesodweb/persistent/issues/474
liftIO setConsoleEncoding
return $ FsckHandle h u
closeDb :: FsckHandle -> Annex ()