]> code.delx.au - gnu-emacs/blobdiff - lisp/filenotify.el
; Fix breakage from previous commit
[gnu-emacs] / lisp / filenotify.el
index f8a53631135af885585763c11bc96de24276c502..61b6d240e6eada9c487a829241a013ecf9ab2101 100644 (file)
@@ -197,8 +197,10 @@ EVENT is the cadr of the event in `file-notify-handle-event'
                       '(attribute-changed changed created deleted renamed))
                action)
               ((memq action '(moved rename))
-               (setq file1 (file-notify--event-file1-name event))
-               'renamed)
+               ;; The kqueue rename event does not return file1 in
+               ;; case a file monitor is established.
+               (if (setq file1 (file-notify--event-file1-name event))
+                   'renamed 'deleted))
               ((eq action 'ignored)
                 (setq stopped t actions nil))
               ((memq action '(attrib link)) 'attribute-changed)