From fd8d4026d4e7b4664571e923166693642794b505 Mon Sep 17 00:00:00 2001 From: Pablo Fraile Alonso Date: Thu, 25 Dec 2025 13:32:43 +0100 Subject: [PATCH] shared/edit-util: ignore ENOTDIR when trying editors --- src/shared/edit-util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c index e5d976fb00..d48c36c1d5 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)