use _wgetenv to get windows env variables
This commit is contained in:
parent
042f84140d
commit
1e8bdc15e2
1 changed files with 3 additions and 1 deletions
|
@ -168,7 +168,9 @@ BrowserMainParts::~BrowserMainParts() {
|
||||||
void OverrideAppLogsPath() {
|
void OverrideAppLogsPath() {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
std::wstring app_name = base::UTF8ToWide(GetApplicationName());
|
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";
|
std::wstring app_log_path = log_path + app_name + L"\\logs";
|
||||||
#else
|
#else
|
||||||
std::string app_name = GetApplicationName();
|
std::string app_name = GetApplicationName();
|
||||||
|
|
Loading…
Reference in a new issue