Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add Windows-specific directory creation for gs_platform_mkdir_default…
…_impl

In msvc, turns out `mkdir` only takes a single argument so this code needs a minor tweak to handle that case. While I was looking at [the official docs](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mkdir?view=msvc-170), also noticed that `mkdir` is deprecated in favor of `_mkdir`, so made that change as well.
  • Loading branch information
reshen authored Dec 4, 2025
commit a06a9adab3edb25839fd3a899f2c8591c3c4f830
2 changes: 2 additions & 0 deletions impl/gs_platform_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ GS_API_DECL int32_t gs_platform_mkdir_default_impl(const char* dir_path, int32_t
{
#ifdef __MINGW32__
return mkdir(dir_path);
#elif (defined GS_PLATFORM_WIN)
return _mkdir(dir_path);
#else
return mkdir(dir_path, opt);
#endif
Expand Down