shared/edit-util: ignore ENOTDIR when trying editors
This commit is contained in:
committed by
Yu Watanabe
parent
76ed202b7f
commit
fd8d4026d4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user