From: Pablo Fraile Alonso Date: Thu, 25 Dec 2025 12:32:43 +0000 (+0100) Subject: shared/edit-util: ignore ENOTDIR when trying editors X-Git-Tag: v260-rc1~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd8d4026d4e7b4664571e923166693642794b505;p=thirdparty%2Fsystemd.git shared/edit-util: ignore ENOTDIR when trying editors --- diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c index e5d976fb009..d48c36c1d5c 100644 --- a/src/shared/edit-util.c +++ b/src/shared/edit-util.c @@ -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)