From e050516702db54eebe586ccbe4130b5c8b7cb6c5 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 21 Oct 2017 11:30:28 -0400 Subject: [PATCH] Correct other failure paths in DirManager::SetProject --- src/DirManager.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/DirManager.cpp b/src/DirManager.cpp index 57ad21f71..adbf3c291 100644 --- a/src/DirManager.cpp +++ b/src/DirManager.cpp @@ -500,8 +500,12 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const if (bCreate) { if (!wxDirExists(projFull)) { - if (!wxMkdir(projFull)) + if (!wxMkdir(projFull)) { + this->projFull = oldFull; + this->projPath = oldPath; + this->projName = oldName; return false; + } else created = true; } @@ -515,8 +519,12 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const #endif } else { - if (!wxDirExists(projFull)) + if (!wxDirExists(projFull)) { + this->projFull = oldFull; + this->projPath = oldPath; + this->projName = oldName; return false; + } } /* Move all files into this NEW directory. Files which are