From dff07d020cffe31bea93a939884558f6531e4901 Mon Sep 17 00:00:00 2001 From: Luca Duran Date: Sun, 26 Apr 2026 14:15:33 -0400 Subject: [PATCH] Fix FileMove from delete file if FileCopy did not work (#5806) --- src/rcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index c3d61f3da..95fb93e20 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2283,7 +2283,7 @@ int FileMove(const char *srcPath, const char *dstPath) if (FileExists(srcPath)) { - if (FileCopy(srcPath, dstPath) == 0) result = FileRemove(srcPath); + if (FileCopy(srcPath, dstPath)) result = FileRemove(srcPath); else TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to copy file to [%s]", srcPath, dstPath); } else TRACELOG(LOG_WARNING, "FILEIO: [%s] Source file does not exist", srcPath);