From 8713741782abfbeba7551a607c109b9fbd764cfa Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 13 Jun 2026 09:21:39 +0200 Subject: [PATCH] Update rcore.c --- src/rcore.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index fde64229d..a37400cf1 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2237,16 +2237,10 @@ 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))) - { - result = 0; - } - else - { - result = MakeDirectory(GetDirectoryPath(dstPath)); - } + if (DirectoryExists(GetDirectoryPath(dstPath))) result = 0; // Already exists + else result = MakeDirectory(GetDirectoryPath(dstPath)); - if (result == 0) // Directory created successfully (or already exists) + if (result == 0) // Directory created successfully or already exists { if ((srcFileData != NULL) && (srcDataSize > 0)) {