Fix FileMove from delete file if FileCopy did not work

This commit is contained in:
Luca Duran 2026-04-26 03:25:13 -04:00 committed by GitHub
parent 0f98d78a67
commit 5f13968d7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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