mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-07 12:12:23 +01:00
Correct other failure paths in DirManager::SetProject
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user