Fix FileCopy result

This commit is contained in:
InviseDivine 2026-06-12 13:53:20 +02:00
parent 94897c4eca
commit 248dbcfe04

View File

@ -2237,8 +2237,11 @@ int FileCopy(const char *srcPath, const char *dstPath)
unsigned char *srcFileData = LoadFileData(srcPath, &srcDataSize);
// Create required paths if they do not exist
if (!DirectoryExists(GetDirectoryPath(dstPath)))
if (DirectoryExists(GetDirectoryPath(dstPath))) {
result = 0;
} else {
result = MakeDirectory(GetDirectoryPath(dstPath));
}
if (result == 0) // Directory created successfully (or already exists)
{