/* 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
#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) */
/* 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);
}
/* Enable watch. */
monitor = g_file_monitor (gfile, gflags, NULL, &gerror);
+ g_object_unref (gfile);
if (gerror)
{
char msg[1024];