summaryrefslogtreecommitdiff
path: root/Utility/INotify.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-04-24 11:45:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-04-24 11:45:41 -0400
commit46c156bfdc22f37a4f80df75384759816cfcfd7f (patch)
tree758b50c9be4e9ab4c531d00b1035dad27e926d46 /Utility/INotify.hs
parentfe272695f1ec414a0d71b842f564c950f0ec9cca (diff)
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?
Diffstat (limited to 'Utility/INotify.hs')
-rw-r--r--Utility/INotify.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Utility/INotify.hs b/Utility/INotify.hs
index 7b5a1fbea..7c495fc67 100644
--- a/Utility/INotify.hs
+++ b/Utility/INotify.hs
@@ -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