create mod directory if it does not exist.

This commit is contained in:
2025-11-02 19:01:08 +01:00
parent 5c621c8367
commit 3c7608ef51
+2
View File
@@ -242,6 +242,7 @@ char **platform_directory_init_scan(const char *path, size_t *out_count)
dir = opendir(path); dir = opendir(path);
if (!dir) { if (!dir) {
mkdir(path, 0755);
*out_count = 0; *out_count = 0;
return NULL; 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); find_handle = FindFirstFileW(search_path, &find_data);
if (find_handle == INVALID_HANDLE_VALUE) { if (find_handle == INVALID_HANDLE_VALUE) {
CreateDirectoryA(path, NULL);
*out_count = 0; *out_count = 0;
return NULL; return NULL;
} }