From af327b49aa52f5f3efc135a5da1c579b327029ce Mon Sep 17 00:00:00 2001 From: David Foerster Date: Fri, 1 Apr 2016 08:29:17 +0200 Subject: Use wx-provided wrapper around *getenv() --- src/Main/Application.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/Main/Application.cpp') diff --git a/src/Main/Application.cpp b/src/Main/Application.cpp index cf71620d..ca9db0b1 100644 --- a/src/Main/Application.cpp +++ b/src/Main/Application.cpp @@ -33,15 +33,10 @@ namespace VeraCrypt wxString *GetXdgConfigPath () { + const wxChar *xdgConfig = wxGetenv(wxT("XDG_CONFIG_HOME")); wxString *configDir; - #ifdef TC_WINDOWS - const wchar_t *xdgConfig = ::_wgetenv(L"XDG_CONFIG_HOME"); - #else - const char *xdgConfig = ::getenv("XDG_CONFIG_HOME"); - #endif - - if (xdgConfig && *xdgConfig) + if (!wxIsEmpty(xdgConfig)) { configDir = new wxString (xdgConfig); //wcerr << L"XDG_CONFIG_HOME=" << *configDir << endl; -- cgit v1.2.3