Signal an error if a watch is requested while another one is active.
dirwatch->io_info = NULL;
xfree (dirwatch->watchee);
dirwatch->watchee = NULL;
+ dirwatch->dir = NULL;
dirwatch->terminate = 1;
}
else
dirwatch.io_info = NULL;
xfree (dirwatch.watchee);
dirwatch.watchee = NULL;
+ dirwatch.dir = NULL;
return -1;
}
return 0;
Qnil);
}
+ if (dirwatch.dir)
+ error ("File watch already active");
+
/* We needa full absolute file name of FILE, and we need to remove
any trailing slashes from it, so that GetFullPathName below gets
the basename part correctly. */