diff --git a/src/DirManager.cpp b/src/DirManager.cpp index 1ed0cb698..a4fb80ace 100644 --- a/src/DirManager.cpp +++ b/src/DirManager.cpp @@ -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 diff --git a/src/Project.cpp b/src/Project.cpp index 01daa8f11..75f81fdb4 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -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; + } } }