diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-12-02 11:30:23 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-12-02 11:30:23 +0100 |
commit | b07c76059d0232aa1c028fc76ddbc122ede91d14 (patch) | |
tree | 0ee8a4ffe1492ba7bddca8079125e2e84524bae2 /win32/ioutil.h | |
parent | 0dba3a8e43aa926b64feccfefdc59dcee394769e (diff) | |
parent | a9e45bc0fb77aaf439642b4c0979ed65237bfdd0 (diff) | |
download | php-git-b07c76059d0232aa1c028fc76ddbc122ede91d14.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #78296: is_file fails to detect file
Diffstat (limited to 'win32/ioutil.h')
-rw-r--r-- | win32/ioutil.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/win32/ioutil.h b/win32/ioutil.h index 71a7b79943..1c2f1a213e 100644 --- a/win32/ioutil.h +++ b/win32/ioutil.h @@ -218,8 +218,16 @@ __forceinline static wchar_t *php_win32_ioutil_conv_any_to_w(const char* in, siz memmove(ret, mb, mb_len * sizeof(wchar_t)); ret[mb_len] = L'\0'; } else { + wchar_t *src = mb, *dst = ret + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW; memmove(ret, PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW, PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW * sizeof(wchar_t)); - memmove(ret+PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW, mb, mb_len * sizeof(wchar_t)); + while (src < mb + mb_len) { + if (*src == PHP_WIN32_IOUTIL_FW_SLASHW) { + *dst++ = PHP_WIN32_IOUTIL_DEFAULT_SLASHW; + src++; + } else { + *dst++ = *src++; + } + } ret[mb_len + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW] = L'\0'; mb_len += PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW; |