From 248dbcfe041c5f6f725f93545fd7bb539ec9b4f5 Mon Sep 17 00:00:00 2001 From: InviseDivine Date: Fri, 12 Jun 2026 13:53:20 +0200 Subject: [PATCH] Fix FileCopy result --- src/rcore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index 137dd99ce..94ecdbe86 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -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) {