webapp: Avoid encoding problems when displaying the daemon log file.
This commit is contained in:
parent
09abd29469
commit
b7c15f3b60
3 changed files with 8 additions and 1 deletions
|
@ -67,5 +67,9 @@ getLogR :: Handler Html
|
||||||
getLogR = page "Logs" Nothing $ do
|
getLogR = page "Logs" Nothing $ do
|
||||||
logfile <- liftAnnex $ fromRepo gitAnnexLogFile
|
logfile <- liftAnnex $ fromRepo gitAnnexLogFile
|
||||||
logs <- liftIO $ listLogs logfile
|
logs <- liftIO $ listLogs logfile
|
||||||
logcontent <- liftIO $ concat <$> mapM readFile logs
|
logcontent <- liftIO $ concat <$> mapM readlog logs
|
||||||
$(widgetFile "control/log")
|
$(widgetFile "control/log")
|
||||||
|
where
|
||||||
|
readlog f = withFile f ReadMode $ \h -> do
|
||||||
|
fileEncoding h -- log may contain invalid utf-8
|
||||||
|
hClose h `after` hGetContentsStrict h
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -15,6 +15,7 @@ git-annex (5.20131102) UNRELEASED; urgency=low
|
||||||
exit nonzero at the end.
|
exit nonzero at the end.
|
||||||
* watcher: Avoid loop when adding a file owned by someone else fails
|
* watcher: Avoid loop when adding a file owned by someone else fails
|
||||||
in indirect mode because its permissions cannot be modified.
|
in indirect mode because its permissions cannot be modified.
|
||||||
|
* webapp: Avoid encoding problems when displaying the daemon log file.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 02 Nov 2013 14:54:36 -0400
|
-- Joey Hess <joeyh@debian.org> Sat, 02 Nov 2013 14:54:36 -0400
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,5 @@ Internal Server Error
|
||||||
git-annex version 4.20131105-g8efdc1a
|
git-annex version 4.20131105-g8efdc1a
|
||||||
# End of transcript or log.
|
# End of transcript or log.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue