mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Use wx-provided wrapper around *getenv()
This commit is contained in:
@@ -33,15 +33,10 @@ namespace VeraCrypt
|
|||||||
|
|
||||||
wxString *GetXdgConfigPath ()
|
wxString *GetXdgConfigPath ()
|
||||||
{
|
{
|
||||||
|
const wxChar *xdgConfig = wxGetenv(wxT("XDG_CONFIG_HOME"));
|
||||||
wxString *configDir;
|
wxString *configDir;
|
||||||
|
|
||||||
#ifdef TC_WINDOWS
|
if (!wxIsEmpty(xdgConfig))
|
||||||
const wchar_t *xdgConfig = ::_wgetenv(L"XDG_CONFIG_HOME");
|
|
||||||
#else
|
|
||||||
const char *xdgConfig = ::getenv("XDG_CONFIG_HOME");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (xdgConfig && *xdgConfig)
|
|
||||||
{
|
{
|
||||||
configDir = new wxString (xdgConfig);
|
configDir = new wxString (xdgConfig);
|
||||||
//wcerr << L"XDG_CONFIG_HOME=" << *configDir << endl;
|
//wcerr << L"XDG_CONFIG_HOME=" << *configDir << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user