add readFileStrictAnyEncoding
This commit is contained in:
parent
beaa7cb757
commit
94251de91e
3 changed files with 12 additions and 6 deletions
|
@ -67,9 +67,5 @@ getLogR :: Handler Html
|
|||
getLogR = page "Logs" Nothing $ do
|
||||
logfile <- liftAnnex $ fromRepo gitAnnexLogFile
|
||||
logs <- liftIO $ listLogs logfile
|
||||
logcontent <- liftIO $ concat <$> mapM readlog logs
|
||||
logcontent <- liftIO $ concat <$> mapM readFileStrictAnyEncoding logs
|
||||
$(widgetFile "control/log")
|
||||
where
|
||||
readlog f = withFile f ReadMode $ \h -> do
|
||||
fileEncoding h -- log may contain invalid utf-8
|
||||
hClose h `after` hGetContentsStrict h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue