mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Bug 137 (P2) - Unreliable project re-opening with orphaned and missing blockfile errors
Apply Michael's patch per http://bugzilla.audacityteam.org/show_bug.cgi?id=137#c15 and http://bugzilla.audacityteam.org/show_bug.cgi?id=137#c19.
This commit is contained in:
parent
995c11bcf9
commit
5e31b813d2
@ -417,10 +417,8 @@ bool DirManager::SetProject(wxString& newProjPath, wxString& newProjName, const
|
||||
#endif
|
||||
|
||||
} else {
|
||||
#ifndef __WXMAC__
|
||||
if (!wxDirExists(projFull))
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Move all files into this new directory. Files which are
|
||||
|
@ -2682,13 +2682,21 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
||||
|
||||
if (!projName.IsEmpty())
|
||||
{
|
||||
// First try to load the data files based on the _data dir given in the .aup file
|
||||
// If this fails then try to use the filename of the .aup as the base directory
|
||||
// This is because unzipped projects e.g. those that get transfered between mac-pc
|
||||
// have encoding issues and end up expanding the wrong filenames for certain
|
||||
// international characters (such as capital 'A' with an umlaut.)
|
||||
if (!mDirManager->SetProject(projPath, projName, false))
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Couldn't find the project data folder: \"%s\""),
|
||||
projName = GetName() + wxT("_data");
|
||||
if (!mDirManager->SetProject(projPath, projName, false)) {
|
||||
wxMessageBox(wxString::Format(_("Couldn't find the project data folder: \"%s\""),
|
||||
projName.c_str()),
|
||||
_("Error opening project"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user