From 6c21e0607bf7e098b5b4cb67c046878466109995 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 6 Nov 2023 17:02:09 +0300 Subject: [PATCH] Use wxFileName::Mkdir instead of wxMkDir. wxMkDir is a CRT wrapper that doesn't actually return bool. --- common/dialogs/git/panel_git_repos.cpp | 2 +- pcbnew/dialogs/panel_fp_lib_table.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/dialogs/git/panel_git_repos.cpp b/common/dialogs/git/panel_git_repos.cpp index 9e0e534d6e..6557bcc342 100644 --- a/common/dialogs/git/panel_git_repos.cpp +++ b/common/dialogs/git/panel_git_repos.cpp @@ -167,7 +167,7 @@ static bool testRepositoryConnection( COMMON_SETTINGS::GIT_REPOSITORY& repositor // Create a temporary directory to initialize the Git repository wxString tempDirPath = wxFileName::CreateTempFileName(wxT("kigit_temp")); - if( !wxMkDir(tempDirPath, wxS_DIR_DEFAULT ) ) + if( !wxFileName::Mkdir( tempDirPath, wxS_DIR_DEFAULT ) ) { git_libgit2_shutdown(); wxLogError( "Failed to create temporary directory for Git repository (%s): %s", tempDirPath, diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index 6c6d5c290d..bbc0066ae6 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -875,7 +875,7 @@ bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps, wxArrayString fpNames; wxFileName newFileName( aNewFilePath ); - if( !newFileName.DirExists() && !wxMkDir( aNewFilePath, wxS_DIR_DEFAULT ) ) + if( !newFileName.DirExists() && !wxFileName::Mkdir( aNewFilePath, wxS_DIR_DEFAULT ) ) return false; try