summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utility')
-rw-r--r--Utility/INotify.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Utility/INotify.hs b/Utility/INotify.hs
index 2ce2b36aa..e9071d906 100644
--- a/Utility/INotify.hs
+++ b/Utility/INotify.hs
@@ -144,13 +144,15 @@ watchDir i dir ignored hooks
_ -> noop
filetype t f = catchBoolIO $ t <$> getSymbolicLinkStatus (indir f)
- -- Inotify fails when there are too many watches with a
- -- disk full error.
failedaddwatch e
+ -- Inotify fails when there are too many watches with a
+ -- disk full error.
| isFullError e =
case errHook hooks of
Nothing -> throw e
Just hook -> tooManyWatches hook dir
+ -- The directory could have been deleted.
+ | isDoesNotExistError e = return ()
| otherwise = throw e
tooManyWatches :: (String -> Maybe FileStatus -> IO ()) -> FilePath -> IO ()