improve display of multiline messages in alerts

This better handles error messages formatted for console display, by
adding a <br> after each line.

Hmm, I wonder if it'd be worth pulling in a markdown formatter, and running
the messages through it?
This commit is contained in:
Joey Hess 2013-04-24 11:45:41 -04:00
parent e72f0b2898
commit 01bedb54c6
3 changed files with 12 additions and 1 deletions

View file

@ -50,6 +50,9 @@ watchDir :: INotify -> FilePath -> (FilePath -> Bool) -> WatchHooks -> IO ()
watchDir i dir ignored hooks
| ignored dir = noop
| otherwise = do
case errHook hooks of
Nothing -> noop
Just hook -> tooManyWatches hook dir
-- Use a lock to make sure events generated during initial
-- scan come before real inotify events.
lock <- newLock