From: Des Date: Fri, 13 Sep 2024 10:24:45 +0000 (-0300) Subject: Check for not-zero instead of -1, since apparently windows only guarantees non-zero X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fdes%2Fdemo_renaming;p=xonotic%2Fdarkplaces.git Check for not-zero instead of -1, since apparently windows only guarantees non-zero --- 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); }