emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6d5a817: Comment out inexplicable condition in file


From: Mattias Engdegård
Subject: [Emacs-diffs] master 6d5a817: Comment out inexplicable condition in filenotify
Date: Sun, 19 May 2019 16:48:16 -0400 (EDT)

branch: master
commit 6d5a8175b34e02fc42c965b5cf6e83c954390f0b
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    Comment out inexplicable condition in filenotify
    
    * 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 | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 26b83ce..d77046d 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]