]> code.delx.au - gnu-emacs/blobdiff - src/gfilenotify.c
Port USE_STACK_LISP_OBJECTS fix to Clang
[gnu-emacs] / src / gfilenotify.c
index 69f635d4115ed9d702378ab9d185dd9479991715..62b4efb0a3dd12f4334c1ba4a1c93846612b68cc 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -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);
     }