From a7a383bef0ddf9cb11035d532caade41e008d389 Mon Sep 17 00:00:00 2001 From: Des Date: Fri, 13 Sep 2024 07:24:45 -0300 Subject: [PATCH] Check for not-zero instead of -1, since apparently windows only guarantees non-zero --- fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs.c b/fs.c index 50bff6ae..82e3ed55 100644 --- a/fs.c +++ b/fs.c @@ -2998,7 +2998,7 @@ int FS_Close (qfile_t* file) if (file->flags & QFILE_FLAG_RENAME && file->renameto) { FS_CreatePath (file->renameto); - if (rename(file->filename, file->renameto) == -1) + if (rename(file->filename, file->renameto) != 0) Con_Printf(CON_WARN "WARNING: could not rename %s to %s on close.\n", file->filename, file->renameto); Mem_Free((void *) file->renameto); } -- 2.39.2