1
0
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:
Paul Licameli
2017-10-21 11:30:28 -04:00
parent 15a1fa14e9
commit e050516702

View File

@@ -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