From 2e7a1a3ded4ea2a54b9e258b500569781874d05c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 9 Nov 2015 18:03:19 +0100 Subject: [PATCH] CID 32208 Time of check time of use --- src/reports.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reports.c b/src/reports.c index 27f3a5c28..ca1cfb0f3 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1541,8 +1541,8 @@ static void prepare_report(struct report_context *ctx, faction *f) } static void mkreportdir(const char *rpath) { - if (_access(rpath, 0) < 0) { - if (_mkdir(rpath) != 0) { + if (_mkdir(rpath) != 0) { + if (_access(rpath, 0) < 0) { log_error("could not create reports directory %s: %s", rpath, strerror(errno)); abort(); }