]> git.eshelyaron.com Git - emacs.git/commitdiff
Comment out inexplicable condition in filenotify
authorMattias Engdegård <mattiase@acm.org>
Sun, 19 May 2019 20:43:31 +0000 (22:43 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 19 May 2019 20:47:31 +0000 (22:47 +0200)
* lisp/filenotify.el (file-notify-callback):
Comment out condition that does not seem to make any sense. All it
seems to do is allowing notifications for files on the form DIR/X/X
when we really just are watching DIR/X/Y.

lisp/filenotify.el

index 26b83ce66c082e9179a2b2d31618afaeb4fcdf8f..d77046d2871b3af66eadf91aafae123cab012d16 100644 (file)
@@ -238,11 +238,17 @@ EVENT is the cadr of the event in `file-notify-handle-event'
                       (string-equal
                        (file-notify--watch-filename watch)
                        (file-name-nondirectory file))
+
                       ;; Directory matches.
-                      (string-equal
-                       (file-name-nondirectory file)
-                       (file-name-nondirectory
-                        (file-notify--watch-directory watch)))
+                      ;;  FIXME: What purpose would this condition serve?
+                      ;;  Doesn't it just slip through events for files
+                      ;;  having the same name as the last component of the
+                      ;;  directory of the file that we are really watching?
+                      ;;(string-equal
+                      ;; (file-name-nondirectory file)
+                      ;; (file-name-nondirectory
+                      ;;  (file-notify--watch-directory watch)))
+
                       ;; File1 matches.
                       (and (stringp file1)
                            (string-equal