From 5ba9a33e18d0e2ecc6547ad39be8e5b1c78e929f Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Fri, 18 Nov 2022 21:58:33 -0500 Subject: [PATCH] misc: make export directory creation recursive --- src/script/functions/export.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/script/functions/export.cpp b/src/script/functions/export.cpp index cf868a7a..4de7e5b2 100644 --- a/src/script/functions/export.cpp +++ b/src/script/functions/export.cpp @@ -54,10 +54,11 @@ String get_export_full_path(String& rel_name) { return fn.GetFullPath(); } -void ensure_dir_valid(String& path) { - wxFileName filename = path; - if (!filename.DirExists()) - filename.Mkdir(); +void ensure_dir_valid(String& path) { + if (!wxDirExists(path)) { + wxFileName filename = path; + filename.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL); + } } // ----------------------------------------------------------------------------- : HTML