1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-08 20:52:09 +01:00

Bug2135: startup should not fail quietly when audacity.cfg is locked...

simplest fix is simply to put up a message box explaining it
This commit is contained in:
Paul Licameli
2019-06-28 08:12:16 -04:00
parent af791d3d0b
commit 1fa46eb085
3 changed files with 24 additions and 0 deletions

View File

@@ -61,6 +61,7 @@
#include <wx/stdpaths.h>
#include "FileNames.h"
#include "Internat.h"
#include "MemoryX.h"
#include "Languages.h"
@@ -220,6 +221,20 @@ void InitPreferences()
wxConfigBase::Set(gPrefs);
}
bool CheckWritablePreferences()
{
return gPrefs->Write("/TEST", true) && gPrefs->Flush();
}
wxString UnwritablePreferencesErrorMessage()
{
wxFileName configFileName(FileNames::DataDir(), wxT("audacity.cfg"));
return wxString::Format(
_("Audacity cannot start because the settings file at %s is not writable."),
configFileName.GetFullPath()
);
}
void FinishPreferences()
{
if (gPrefs) {