CID 32208 Time of check time of use

This commit is contained in:
Enno Rehling 2015-11-09 18:03:19 +01:00
parent 82994e5fd1
commit 2e7a1a3ded

View file

@ -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();
}