mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-24 16:20:05 +02:00
Dissallow OD loading for lossless copy projects
Opening a backup copy project converts to a normal project. We copy in the dependencies when we convert to ensure that the project remains complete and self contained (which is not guaranteed with OD loading).
This commit is contained in:
parent
77a65a8a97
commit
32212d7fcd
@ -3115,8 +3115,25 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
||||
|
||||
XMLFileReader xmlFile;
|
||||
|
||||
// 'Lossless copy' projects have dependencies. We need to always copy-in
|
||||
// these dependencies when converting to a normal project.
|
||||
wxString oldAction = gPrefs->Read(wxT("/FileFormats/CopyOrEditUncompressedData"), wxT("copy"));
|
||||
bool oldAsk = gPrefs->Read(wxT("/Warnings/CopyOrEditUncompressedDataAsk"), true)?true:false;
|
||||
if (oldAction != wxT("copy"))
|
||||
gPrefs->Write(wxT("/FileFormats/CopyOrEditUncompressedData"), wxT("copy"));
|
||||
if (oldAsk)
|
||||
gPrefs->Write(wxT("/Warnings/CopyOrEditUncompressedDataAsk"), (long) false);
|
||||
gPrefs->Flush();
|
||||
|
||||
bool bParseSuccess = xmlFile.Parse(this, fileName);
|
||||
|
||||
// and restore old settings if necessary.
|
||||
if (oldAction != wxT("copy"))
|
||||
gPrefs->Write(wxT("/FileFormats/CopyOrEditUncompressedData"), oldAction);
|
||||
if (oldAsk)
|
||||
gPrefs->Write(wxT("/Warnings/CopyOrEditUncompressedDataAsk"), (long) true);
|
||||
gPrefs->Flush();
|
||||
|
||||
// Clean up now unused recording recovery handler if any
|
||||
mRecordingRecoveryHandler.reset();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user