summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-10-23 13:14:09 +0200
committerMichael Albinus <michael.albinus@gmx.de>2015-10-23 13:14:09 +0200
commit71d6acff1cabbf983c8191d02f084faf3f56d788 (patch)
tree10d7aab22f279cee48a9bb436bf56074a859be04 /lisp/filenotify.el
parent0f7334147d23ad2792523f59a968fb44c820fa35 (diff)
downloademacs-71d6acff1cabbf983c8191d02f084faf3f56d788.tar.gz
Fix Bug#21669
* lisp/filenotify.el (file-notify-rm-watch): Improve check for calling low-level functions. * test/automated/file-notify-tests.el (file-notify--test-timeout): Decrase to 6 seconds for remote directories. (file-notify-test02-events): Expect different number of `attribute-changed' events for the local and remote cases. Apply short delays between the operations, in order to receive all events in the remote case. Combine `attribute-change' tests. (Bug#21669)
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index a07f99adcbf..b9f59dedfde 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -333,7 +333,9 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
(when (stringp dir)
;; Call low-level function.
- (when (null (cdr registered))
+ (when (or (not file)
+ (and (= (length (cdr registered)) 1)
+ (assoc file (cdr registered))))
(condition-case nil
(if handler
;; A file name handler could exist even if there is no local