Skip to content
Snippets Groups Projects
Commit 0532f9be authored by Paul Licameli's avatar Paul Licameli
Browse files

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.
parent 9c028c07
Branches
Tags
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment