VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Application.cpp')
-rw-r--r--src/Main/Application.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main/Application.cpp b/src/Main/Application.cpp
index c72e2cc6..27b8f55a 100644
--- a/src/Main/Application.cpp
+++ b/src/Main/Application.cpp
@@ -62,61 +62,61 @@ namespace VeraCrypt
configDir->swap(legacyConfigDir);
}
}
#endif
}
//wcerr << L"Config dir: " << *configDir << endl;
return configDir;
}
}
wxApp* Application::CreateConsoleApp ()
{
mUserInterface = new TextUserInterface;
mUserInterfaceType = UserInterfaceType::Text;
return mUserInterface;
}
#ifndef TC_NO_GUI
wxApp* Application::CreateGuiApp ()
{
mUserInterface = new GraphicUserInterface;
mUserInterfaceType = UserInterfaceType::Graphic;
wxSetEnv("WXSUPPRESS_SIZER_FLAGS_CHECK", "1");
return mUserInterface;
}
#endif
FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir)
{
- static wxScopedPtr<const wxString> configDirC;
+ static std::unique_ptr<const wxString> configDirC;
static bool configDirExists = false;
if (!configDirExists)
{
if (!configDirC)
{
wxString *configDir;
if (Core->IsInPortableMode())
{
configDir = new wxString (
wxPathOnly(wxStandardPaths::Get().GetExecutablePath()));
}
else
{
configDir = GetXdgConfigPath();
}
EnsureEndsWithPathSeparator(*configDir);
configDirC.reset(configDir);
}
if (createConfigDir)
{
if (!wxDirExists(*configDirC))
{
//wcerr << L"Creating config dir »" << *configDirC << L"« ..." << endl;
throw_sys_sub_if(
!wxMkdir(*configDirC, wxS_IRUSR | wxS_IWUSR | wxS_IXUSR),
configDirC->ToStdWstring());