fscript->path);
}
}
+
+ /* Best-effort: drop the compiled binary as well so it does not
+ linger as a stale orphan. */
+ if (fscript->bin_path != NULL &&
+ unlink(fscript->bin_path) < 0 && errno != ENOENT) {
+ e_error(script->event,
+ "unlink(%s) failed: %m", fscript->bin_path);
+ }
return ret;
}
fscript->path);
}
+ /* Drop the old compiled binary; the renamed
+ script will recompile under its new name. */
+ if (fscript->bin_path != NULL &&
+ unlink(fscript->bin_path) < 0 &&
+ errno != ENOENT) {
+ e_error(script->event,
+ "unlink(%s) failed: %m",
+ fscript->bin_path);
+ }
+
if (script->name != NULL && *script->name != '\0')
script->name = p_strdup(script->pool, newname);
fscript->path = p_strdup(script->pool, newpath);