diff --git a/src/reports.c b/src/reports.c index 507ad40a8..27f3a5c28 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1540,6 +1540,15 @@ static void prepare_report(struct report_context *ctx, faction *f) ctx->last = lastregion(f); } +static void mkreportdir(const char *rpath) { + if (_access(rpath, 0) < 0) { + if (_mkdir(rpath) != 0) { + log_error("could not create reports directory %s: %s", rpath, strerror(errno)); + abort(); + } + } +} + int write_reports(faction * f, time_t ltime) { unsigned int backup = 1, maxbackup = 128 * 1000; @@ -1626,15 +1635,6 @@ static void check_messages_exist(void) { ct_checknames(); } -void mkreportdir(const char *rpath) { - if (_access(rpath, 0) < 0) { - if (_mkdir(rpath) != 0) { - log_error("could not create reports directory %s: %s", rpath, strerror(errno)); - abort(); - } - } -} - int init_reports(void) { check_messages_exist();