]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Check for not-zero instead of -1, since apparently windows only guarantees non-zero
authorDes <xon@damianv.com.ar>
Fri, 13 Sep 2024 10:24:45 +0000 (07:24 -0300)
committerDes <xon@damianv.com.ar>
Fri, 13 Sep 2024 10:24:45 +0000 (07:24 -0300)
fs.c

diff --git a/fs.c b/fs.c
index 50bff6ae3286bd83cf87e37ba4539e96ef1f0dbb..82e3ed55660ef141fff62220c50858e039c81eb0 100644 (file)
--- 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);
                }