mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-06 03:32:09 +01:00
(bug 137)
Make DirManager::MoveToNewProjectDirectory(), DirManager::CopyToNewProjectDirectory(), and several BuildFromXML() methods check the result of AssignFile() and do something appropriate about it on failure, rather than ignoring it. Also made AssignFile() check whether the assigned name is well-formed, so it doesn't always return TRUE when disckcheck is FALSE. Briefer and more correct checks for uninitialized wxFileName objects. Several "//ANSWER-ME" comments about file ops and commented-out cruft to probably remove. Clarify some logic and readability.
This commit is contained in:
@@ -243,7 +243,11 @@ BlockFile *ODDecodeBlockFile::BuildFromXML(DirManager &dm, const wxChar **attrs)
|
||||
&& (strValue.Length() + 1 + dm.GetProjectDataDir().Length() <= MAX_PATH)
|
||||
#endif
|
||||
)
|
||||
dm.AssignFile(summaryFileName, strValue, false);
|
||||
{
|
||||
if (!dm.AssignFile(summaryFileName, strValue, false))
|
||||
// Make sure summaryFileName is back to uninitialized state so we can detect problem later.
|
||||
summaryFileName.Clear();
|
||||
}
|
||||
else if( !wxStricmp(attr, wxT("audiofile")) )
|
||||
{
|
||||
if (XMLValueChecker::IsGoodPathName(strValue))
|
||||
|
||||
Reference in New Issue
Block a user