shared/edit-util: ignore ENOTDIR when trying editors

This commit is contained in:
Pablo Fraile Alonso
2026-01-05 22:22:11 +09:00
committed by Yu Watanabe
parent 76ed202b7f
commit fd8d4026d4
+6
View File
@@ -298,6 +298,12 @@ static int run_editor_child(const EditFileContext *context) {
execvp(args[0], (char* const*) args);
if (errno == ENOTDIR) {
log_debug_errno(errno,
"Failed to execute '%s': a path component is not a directory, skipping...",
name);
continue;
}
/* We do not fail if the editor doesn't exist because we want to try each one of them
* before failing. */
if (errno != ENOENT)