summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-10 14:24:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-10 14:24:53 +0000
commit0d70c707aeca423854b62d5be6ee2013f2afc2ee (patch)
treefb58ed8fcb8fb597af56383dd8de5f3343e0ad91 /win32
parent1b0cbb6ae07e001893d7f08933a013851b60d0e0 (diff)
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
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c3
1 files changed, 3 insertions, 0 deletions
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)) &&