зеркало из https://github.com/github/ruby.git
* win32/win32.c (rb_w32_wreadlink): fixed a bug that a junktion misses
its drive letter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
325a50fc57
Коммит
596f081d68
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Apr 20 15:02:47 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_wreadlink): fixed a bug that a junktion misses
|
||||||
|
its drive letter.
|
||||||
|
|
||||||
Mon Apr 20 12:54:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
Mon Apr 20 12:54:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
* ext/openssl/*: use license instead of licence.
|
* ext/openssl/*: use license instead of licence.
|
||||||
|
|
|
@ -4731,9 +4731,18 @@ rb_w32_wreadlink(const WCHAR *path, WCHAR *buf, size_t bufsize)
|
||||||
e = EINVAL;
|
e = EINVAL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
void *name = ((char *)rp.SymbolicLinkReparseBuffer.PathBuffer +
|
void *name;
|
||||||
rp.SymbolicLinkReparseBuffer.PrintNameOffset);
|
if (rp.ReparseTag == IO_REPARSE_TAG_SYMLINK) {
|
||||||
ret = rp.SymbolicLinkReparseBuffer.PrintNameLength;
|
name = ((char *)rp.SymbolicLinkReparseBuffer.PathBuffer +
|
||||||
|
rp.SymbolicLinkReparseBuffer.PrintNameOffset);
|
||||||
|
ret = rp.SymbolicLinkReparseBuffer.PrintNameLength;
|
||||||
|
}
|
||||||
|
else { /* IO_REPARSE_TAG_MOUNT_POINT */
|
||||||
|
/* +4/-4 mean to drop "?\" */
|
||||||
|
name = ((char *)rp.SymbolicLinkReparseBuffer.PathBuffer +
|
||||||
|
rp.SymbolicLinkReparseBuffer.SubstituteNameOffset + 4);
|
||||||
|
ret = rp.SymbolicLinkReparseBuffer.SubstituteNameLength - 4;
|
||||||
|
}
|
||||||
((WCHAR *)name)[ret/sizeof(WCHAR)] = L'\0';
|
((WCHAR *)name)[ret/sizeof(WCHAR)] = L'\0';
|
||||||
translate_wchar(name, L'\\', L'/');
|
translate_wchar(name, L'\\', L'/');
|
||||||
bufsize *= sizeof(WCHAR);
|
bufsize *= sizeof(WCHAR);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче