]> code.delx.au - gnu-emacs/blobdiff - src/gfilenotify.c
* cl-generic.el (cl-defmethod): Make docstring dynamic
[gnu-emacs] / src / gfilenotify.c
index 2057f8853006d7c823daf967884bbc424338ac43..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
@@ -110,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);
     }