From b93d24e07d903d5860f20ec97849760091348d98 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Jun 2023 11:19:31 +0200 Subject: [PATCH] execute: shorten code by making use of laccess() return code properly --- src/core/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/execute.c b/src/core/execute.c index c3eeaa486b5..652ff444221 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2615,7 +2615,7 @@ static int setup_exec_directory( goto fail; if (is_dir(p, false) > 0 && - (laccess(pp, F_OK) < 0 && errno == ENOENT)) { + (laccess(pp, F_OK) == -ENOENT)) { /* Hmm, the private directory doesn't exist yet, but the normal one exists? If so, move * it over. Most likely the service has been upgraded from one that didn't use -- 2.47.3