win32.c: fix for old platforms
* win32/win32.c (open_dir_handle): fix for old platforms where GetFinalPathNameByHandleW is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0cc69b74e
commit
14ae6199bf
@ -1860,7 +1860,7 @@ open_dir_handle(const WCHAR *filename, WIN32_FIND_DATAW *fd)
|
|||||||
WCHAR fullname[MAX_PATH];
|
WCHAR fullname[MAX_PATH];
|
||||||
WCHAR *scanname;
|
WCHAR *scanname;
|
||||||
WCHAR *p;
|
WCHAR *p;
|
||||||
int len;
|
int len = 0;
|
||||||
VALUE v;
|
VALUE v;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1872,6 +1872,8 @@ open_dir_handle(const WCHAR *filename, WIN32_FIND_DATAW *fd)
|
|||||||
if (fh != INVALID_HANDLE_VALUE) {
|
if (fh != INVALID_HANDLE_VALUE) {
|
||||||
len = get_final_path(fh, fullname, numberof(fullname), 0);
|
len = get_final_path(fh, fullname, numberof(fullname), 0);
|
||||||
CloseHandle(fh);
|
CloseHandle(fh);
|
||||||
|
}
|
||||||
|
if (len) {
|
||||||
filename = fullname;
|
filename = fullname;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user