mirror of
https://github.com/electron/electron.git
synced 2026-02-03 19:55:43 -05:00
use _wgetenv to get windows env variables
This commit is contained in:
@@ -168,7 +168,9 @@ BrowserMainParts::~BrowserMainParts() {
|
||||
void OverrideAppLogsPath() {
|
||||
#if defined(OS_WIN)
|
||||
std::wstring app_name = base::UTF8ToWide(GetApplicationName());
|
||||
std::wstring log_path = L"%HOMEDRIVE%%HOMEPATH%\\AppData\\Roaming\\";
|
||||
std::wstring drive = _wgetenv(L"HOMEDRIVE"));
|
||||
std::wstring path = _wgetenv(L"HOMEPATH"));
|
||||
std::wstring log_path = drive + "\\" + path + L"\\AppData\\Roaming\\";
|
||||
std::wstring app_log_path = log_path + app_name + L"\\logs";
|
||||
#else
|
||||
std::string app_name = GetApplicationName();
|
||||
|
||||
Reference in New Issue
Block a user