mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-22 23:30:07 +02:00
Fixes #1305.
The check for macro directory now only happens if directory is selected and exists,
This commit is contained in:
parent
92aad00625
commit
be3cf9903e
@ -418,8 +418,7 @@ bool DirectoriesPrefs::Validate()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If the directory already exists, make sure it is writable */
|
/* If the directory already exists, make sure it is writable */
|
||||||
if (!FileNames::WritableLocationCheck(mTempText->GetValue()) ||
|
if (!FileNames::WritableLocationCheck(mTempText->GetValue()))
|
||||||
!FileNames::WritableLocationCheck(mMacrosText->GetValue()))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -448,6 +447,19 @@ bool DirectoriesPrefs::Validate()
|
|||||||
wxOK | wxCENTRE | wxICON_INFORMATION);
|
wxOK | wxCENTRE | wxICON_INFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wxString macroPathString = mMacrosText->GetValue();
|
||||||
|
|
||||||
|
if (!macroPathString.empty())
|
||||||
|
{
|
||||||
|
const wxFileName macroPath { macroPathString };
|
||||||
|
|
||||||
|
if (macroPath.DirExists())
|
||||||
|
{
|
||||||
|
if (!FileNames::WritableLocationCheck(macroPathString))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user