From c0da97e9a7892e15a643993b1d4ba0250353780d Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sun, 27 Oct 2024 03:11:07 +0100 Subject: [PATCH] SDL_CreateDirectory(): Clear error message when it succeeds after first failing --- src/filesystem/SDL_filesystem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/filesystem/SDL_filesystem.c b/src/filesystem/SDL_filesystem.c index a29ae38fdda20b..158c4aa99fa5f9 100644 --- a/src/filesystem/SDL_filesystem.c +++ b/src/filesystem/SDL_filesystem.c @@ -107,6 +107,11 @@ bool SDL_CreateDirectory(const char *path) } SDL_free(parents); + + // clear error message when all is good after some hickups + if (retval) { + SDL_ClearError(); + } } return retval; }