mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 08:30:06 +02:00
More sanity checking in file save ...
... against corruption as seen in: http://forum.audacityteam.org/viewtopic.php?f=47&t=97787 Maybe this early check would have alerted the user sooner and prevented trouble.
This commit is contained in:
parent
9c028c0761
commit
0532f9be37
@ -1370,7 +1370,11 @@ std::pair<bool, wxString> DirManager::CopyToNewProjectDirectory(BlockFile *f)
|
||||
}
|
||||
|
||||
wxFileNameWrapper newFileName;
|
||||
if (!this->AssignFile(newFileName, oldFileNameRef.GetFullName(), false))
|
||||
if (!this->AssignFile(newFileName, oldFileNameRef.GetFullName(), false)
|
||||
// Another sanity check against blockfiles getting reassigned an empty
|
||||
// name, as apparently happened in
|
||||
// http://forum.audacityteam.org/viewtopic.php?f=47&t=97787 :
|
||||
|| newFileName.GetFullName().empty() )
|
||||
return { false, {} };
|
||||
|
||||
if (newFileName != oldFileNameRef) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user