mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 01:34:57 +00:00
only attempt to monitor the modification time of a plugin if the command does not contain spaces
This commit is contained in:
@ -37,7 +37,7 @@ struct PluginEventSifter {
|
||||
r = fdopen(rfd, "r");
|
||||
w = fdopen(wfd, "w");
|
||||
setlinebuf(w);
|
||||
{
|
||||
if (currPluginCmd.find(' ') == std::string::npos) {
|
||||
struct stat statbuf;
|
||||
if (stat(currPluginCmd.c_str(), &statbuf)) throw herr("couldn't stat plugin: ", currPluginCmd);
|
||||
lastModTime = statbuf.st_mtim;
|
||||
@ -64,7 +64,7 @@ struct PluginEventSifter {
|
||||
if (running) {
|
||||
if (pluginCmd != running->currPluginCmd) {
|
||||
running.reset();
|
||||
} else {
|
||||
} else if (pluginCmd.find(' ') == std::string::npos) {
|
||||
struct stat statbuf;
|
||||
if (stat(pluginCmd.c_str(), &statbuf)) throw herr("couldn't stat plugin: ", pluginCmd);
|
||||
if (statbuf.st_mtim.tv_sec != running->lastModTime.tv_sec || statbuf.st_mtim.tv_nsec != running->lastModTime.tv_nsec) {
|
||||
|
Reference in New Issue
Block a user