[前][次][番号順一覧][スレッド一覧]

ruby-changes:36283

From: nobu <ko1@a...>
Date: Mon, 10 Nov 2014 23:25:07 +0900 (JST)
Subject: [ruby-changes:36283] nobu:r48364 (trunk): win32.c: user name

nobu	2014-11-10 23:24:53 +0900 (Mon, 10 Nov 2014)

  New Revision: 48364

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48364

  Log:
    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]

  Modified files:
    trunk/win32/win32.c
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 48363)
+++ win32/win32.c	(revision 48364)
@@ -552,6 +552,9 @@ init_env(void) https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L552
 	    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)) &&

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]