mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-19 17:28:09 +01:00
Used IdDirWritable() for checking write permissions for Bug #2740
This commit is contained in:
committed by
Paul Licameli
parent
4ed2e0d265
commit
bf14b2bef8
@@ -371,6 +371,21 @@ void DirectoriesPrefs::OnBrowse(wxCommandEvent &evt)
|
||||
}
|
||||
}
|
||||
|
||||
if (evt.GetId() == SaveButtonID || evt.GetId() == ExportButtonID)
|
||||
{
|
||||
bool Status = wxFileName ::IsDirWritable(dlog.GetPath());
|
||||
wxString path{dlog.GetPath()};
|
||||
if (!Status)
|
||||
{
|
||||
AudacityMessageBox(
|
||||
XO("Directory %s does not have write permissions")
|
||||
.Format(path),
|
||||
XO("Error"),
|
||||
wxOK | wxICON_ERROR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
tc->SetValue(dlog.GetPath());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user