From 0d70c707aeca423854b62d5be6ee2013f2afc2ee Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 10 Nov 2014 14:24:53 +0000 Subject: 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 --- win32/win32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32/win32.c b/win32/win32.c index 308f4836f9..29f95c9a1f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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)) && -- cgit v1.2.3