We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22cc255 commit 83e35baCopy full SHA for 83e35ba
1 file changed
src/rcore.c
@@ -2274,14 +2274,16 @@ int FileCopy(const char *srcPath, const char *dstPath)
2274
// NOTE: If dst directories do not exists they are created
2275
int FileMove(const char *srcPath, const char *dstPath)
2276
{
2277
- int result = 0;
+ int result = -1;
2278
2279
if (FileExists(srcPath))
2280
2281
- FileCopy(srcPath, dstPath);
2282
- FileRemove(srcPath);
+ if (FileCopy(srcPath, dstPath) == 0)
+ result = FileRemove(srcPath);
2283
+ else
2284
+ TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to copy file to [%s]", srcPath, dstPath);
2285
}
- else result = -1;
2286
+ else TRACELOG(LOG_WARNING, "FILEIO: [%s] Source file does not exist", srcPath);
2287
2288
return result;
2289
0 commit comments