From 3c7608ef51aaec97378bf01e22c9e1d49e9aa19a Mon Sep 17 00:00:00 2001 From: anth64 Date: Sun, 2 Nov 2025 19:01:08 +0100 Subject: [PATCH] create mod directory if it does not exist. --- src/platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform.c b/src/platform.c index 50379c7..2cd1557 100644 --- a/src/platform.c +++ b/src/platform.c @@ -242,6 +242,7 @@ char **platform_directory_init_scan(const char *path, size_t *out_count) dir = opendir(path); if (!dir) { + mkdir(path, 0755); *out_count = 0; return NULL; } @@ -293,6 +294,7 @@ char **platform_directory_init_scan(const char *path, size_t *out_count) find_handle = FindFirstFileW(search_path, &find_data); if (find_handle == INVALID_HANDLE_VALUE) { + CreateDirectoryA(path, NULL); *out_count = 0; return NULL; }