зеркало из https://github.com/github/ruby.git
win32.c: fix offset
* win32/win32.c (opendir_internal): fix offset not to overwrite a backslash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2f6fdd3aeb
Коммит
14aed229ea
|
@ -1951,7 +1951,7 @@ opendir_internal(WCHAR *wpath, const char *filename)
|
|||
WCHAR *tmppath = malloc((pathlen + len + 1) * sizeof(WCHAR));
|
||||
memcpy(tmppath, wpath, pathlen * sizeof(WCHAR));
|
||||
tmppath[pathlen] = L'\\';
|
||||
memcpy(tmppath + pathlen, fd.cFileName, len * sizeof(WCHAR));
|
||||
memcpy(tmppath + pathlen + 1, fd.cFileName, len * sizeof(WCHAR));
|
||||
if (rb_w32_reparse_symlink_p(tmppath))
|
||||
SetBit(p->bits, BitOfIsRep(p->nfiles));
|
||||
free(tmppath);
|
||||
|
|
Загрузка…
Ссылка в новой задаче