SDL: filesystem: OpenHarmony support in posix SDL_SYS_CreateDirectory.

From 3ba0cef69508d27cdc56fc2d79c7e1765af777c2 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 28 Oct 2026 14:25:21 -0400
Subject: [PATCH] filesystem: OpenHarmony support in posix
 SDL_SYS_CreateDirectory.

This probably needs the same magic as Android, so it's now updated for that.
---
 src/filesystem/posix/SDL_sysfsops.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/filesystem/posix/SDL_sysfsops.c b/src/filesystem/posix/SDL_sysfsops.c
index f809ea3162e13..715bf988e4eaf 100644
--- a/src/filesystem/posix/SDL_sysfsops.c
+++ b/src/filesystem/posix/SDL_sysfsops.c
@@ -304,11 +304,11 @@ bool SDL_SYS_CreateDirectory(const char *path)
     const char *mkdir_path = path;
     char *apath = NULL;
 
-#if defined(SDL_PLATFORM_ANDROID) || defined(SDL_PLATFORM_IOS)
+#if defined(SDL_PLATFORM_ANDROID) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_OPENHARMONY)
     if (*path != '/') {
-#ifdef SDL_PLATFORM_ANDROID
-        SDL_asprintf(&apath, "%s/%s", SDL_GetAndroidInternalStoragePath(), path);
-#elif defined(SDL_PLATFORM_IOS)
+        #if defined(SDL_PLATFORM_ANDROID) || defined(SDL_PLATFORM_OPENHARMONY)
+        SDL_asprintf(&apath, "%s/%s", SDL_GetPlatformInternalStoragePath(), path);
+        #elif defined(SDL_PLATFORM_IOS)
         char *base = SDL_GetPrefPath("", "");
         if (!base) {
             return false;
@@ -316,7 +316,7 @@ bool SDL_SYS_CreateDirectory(const char *path)
 
         SDL_asprintf(&apath, "%s%s", base, path);
         SDL_free(base);
-#endif
+        #endif
         if (!apath) {
             return false;
         }