(when-let* ((watch (gethash (car event) file-notify-descriptors)))
(directory-file-name
(expand-file-name
- (or (and (stringp (nth 2 event)) (nth 2 event)) "")
+ (or (and (stringp (nth 2 event)) (nth 2 event)) "")
(file-notify--watch-directory watch)))))
;; Only `gfilenotify' could return two file names.
;; TODO:
-;; * Watching a /dir/file may receive events for dir.
-;; (This may be the desired behavior.)
-;; * Watching a file in an already watched directory
+
+;; * Watching a file in an already watched directory.
;; If the file is created and *then* a watch is added to that file, the
;; watch might receive events which occurred prior to it being created,
;; due to the way events are propagated during idle time. Note: This
(file-notify--test-with-events
(cond
;; w32notify does not raise `deleted' and `stopped'
- ;; events for the watched directory.
- ((string-equal (file-notify--test-library) "w32notify")
+ ;; events for the watched directory. Same for inotify on emba.
+ ((or (string-equal (file-notify--test-library) "w32notify")
+ (and (string-equal (file-notify--test-library) "inotify")
+ (getenv "EMACS_EMBA_CI")))
'(created changed deleted))
;; gvfs-monitor-dir on cygwin does not detect the
;; `created' event reliably.