1
0
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:
v.audacity 2011-03-25 23:13:07 +00:00
parent 995c11bcf9
commit 5e31b813d2
2 changed files with 11 additions and 5 deletions

View File

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

View File

@ -2681,14 +2681,22 @@ 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;
}
}
}