]> code.delx.au - gnu-emacs/blobdiff - src/gfilenotify.c
* test/lisp/help-fns-tests.el: Add several tests for 'describe-function'.
[gnu-emacs] / src / gfilenotify.c
index 69f635d4115ed9d702378ab9d185dd9479991715..3b1f2fc516ac3b36feaae01783c84cbf1d57b25c 100644 (file)
@@ -1,12 +1,12 @@
 /* Filesystem notifications support with glib API.
-   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,10 +23,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <gio/gio.h>
 #include "lisp.h"
 #include "coding.h"
-#include "frame.h"
 #include "termhooks.h"
 #include "keyboard.h"
-#include "process.h"
 
 \f
 /* This is a list, elements are triples (DESCRIPTOR FILE FLAGS CALLBACK)  */
@@ -112,6 +110,7 @@ dir_monitor_callback (GFileMonitor *monitor,
 
       /* Cancel monitor if file or directory is deleted.  */
       if (!NILP (Fmember (symbol, list2 (Qdeleted, Qmoved))) &&
+         (strcmp (name, SSDATA (XCAR (XCDR (watch_object)))) == 0) &&
          !g_file_monitor_is_cancelled (monitor))
        g_file_monitor_cancel (monitor);
     }