From cb03467f0fe9f24c1e0a10201bc4f7c0dc4d02a9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Dec 2025 22:44:42 +0100 Subject: [PATCH] Provide default value for wxMkDir() "mode" under all platforms Previously this function could be called with just path only under Windows and not when using Cygwin. Make it possible to always omit mode and use the appropriate default value in this case. This improves consistency and fixes build of wxWidgets itself under Cygwin. Closes #26042. --- include/wx/filefn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 0abd2abe0c..e79c8f67c5 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -381,7 +381,7 @@ inline int wxRmDir(const wxString& path) inline int wxMkDir(const wxString& path, mode_t WXUNUSED(mode) = 0) { return wxCRT_MkDir(path.fn_str()); } #else -inline int wxMkDir(const wxString& path, mode_t mode) +inline int wxMkDir(const wxString& path, mode_t mode = 0777) { return wxCRT_MkDir(path.fn_str(), mode); } #endif