diff --git a/src/core/execute.c b/src/core/execute.c index 9ddba00..46aa733 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2097,11 +2097,12 @@ static int setup_exec_directory( } } else { r = mkdir_label(p, context->directories[type].mode); - if (r < 0 && r != -EEXIST) - goto fail; - if (r == -EEXIST) { + if (r < 0) { struct stat st; + if (r != -EEXIST) + goto fail; + if (stat(p, &st) < 0) { r = -errno; goto fail;