ruby-changes:39610
From: nobu <ko1@a...>
Date: Wed, 26 Aug 2015 23:13:05 +0900 (JST)
Subject: [ruby-changes:39610] nobu:r51691 (trunk): win32.c: fix for old platforms
nobu 2015-08-26 23:12:43 +0900 (Wed, 26 Aug 2015) New Revision: 51691 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51691 Log: win32.c: fix for old platforms * win32/win32.c (open_dir_handle): fix for old platforms where GetFinalPathNameByHandleW is not supported. Modified files: trunk/win32/win32.c Index: win32/win32.c =================================================================== --- win32/win32.c (revision 51690) +++ win32/win32.c (revision 51691) @@ -1860,7 +1860,7 @@ open_dir_handle(const WCHAR *filename, W https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1860 WCHAR fullname[MAX_PATH]; WCHAR *scanname; WCHAR *p; - int len; + int len = 0; VALUE v; // @@ -1872,6 +1872,8 @@ open_dir_handle(const WCHAR *filename, W https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1872 if (fh != INVALID_HANDLE_VALUE) { len = get_final_path(fh, fullname, numberof(fullname), 0); CloseHandle(fh); + } + if (len) { filename = fullname; } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/