mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Bug 2669 - Win: Save As can be used to overwrite the existing project without warning
This commit is contained in:
parent
db34fabb18
commit
8fce1db1ae
@ -220,7 +220,7 @@ bool ProjectFileManager::Save()
|
||||
// Prompt for file name?
|
||||
if (projectFileIO.IsTemporary())
|
||||
{
|
||||
return SaveAs();
|
||||
return SaveAs(true);
|
||||
}
|
||||
|
||||
return DoSave(projectFileIO.GetFileName(), false);
|
||||
@ -409,7 +409,7 @@ bool ProjectFileManager::SaveAs(const FilePath &newFileName, bool addToHistory /
|
||||
return(success);
|
||||
}
|
||||
|
||||
bool ProjectFileManager::SaveAs()
|
||||
bool ProjectFileManager::SaveAs(bool allowOverwrite /* = false */)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
@ -466,7 +466,7 @@ For an audio file that will open in other apps, use 'Export'.\n");
|
||||
|
||||
filename.SetExt(wxT("aup3"));
|
||||
|
||||
if (!bPrompt && filename.FileExists()) {
|
||||
if ((!bPrompt || !allowOverwrite) && filename.FileExists()) {
|
||||
// Saving a copy of the project should never overwrite an existing project.
|
||||
AudacityMessageDialog m(
|
||||
nullptr,
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
void CompactProjectOnClose();
|
||||
|
||||
bool Save();
|
||||
bool SaveAs();
|
||||
bool SaveAs(bool allowOverwrite = false);
|
||||
bool SaveAs(const FilePath &newFileName, bool addToHistory = true);
|
||||
// strProjectPathName is full path for aup except extension
|
||||
bool SaveFromTimerRecording( wxFileName fnFile );
|
||||
|
Loading…
x
Reference in New Issue
Block a user