mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32.c: user name
* win32/win32.c (init_env): save USER environment variable in login name if it is set. [ruby-core:66163] [Bug #10493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b0cbb6ae0
commit
0d70c707ae
1 changed files with 3 additions and 0 deletions
|
@ -552,6 +552,9 @@ init_env(void)
|
|||
NTLoginName = rb_w32_wstr_to_mbstr(CP_UTF8, env, -1, NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
NTLoginName = rb_w32_wstr_to_mbstr(CP_UTF8, env, -1, NULL);
|
||||
}
|
||||
|
||||
if (!GetEnvironmentVariableW(TMPDIR, env, numberof(env)) &&
|
||||
!GetEnvironmentVariableW(L"TMP", env, numberof(env)) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue