File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,8 @@ PW32IO int php_win32_ioutil_close(int fd)
281
281
282
282
PW32IO int php_win32_ioutil_mkdir_w (const wchar_t * path , mode_t mode )
283
283
{/*{{{*/
284
- size_t path_len , dir_len = 0 ;
284
+ size_t path_len ;
285
+ DWORD dir_len = 0 ;
285
286
const wchar_t * my_path ;
286
287
287
288
if (!path ) {
@@ -336,7 +337,7 @@ PW32IO int php_win32_ioutil_mkdir_w(const wchar_t *path, mode_t mode)
336
337
dst = _tmp + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW ;
337
338
#ifndef ZTS
338
339
if (dir_len > 0 ) {
339
- size_t len = GetCurrentDirectoryW (dir_len , dst );
340
+ DWORD len = GetCurrentDirectoryW (dir_len , dst );
340
341
if (len == 0 || len + 1 != dir_len ) {
341
342
free (tmp );
342
343
free (_tmp );
Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w(w
175
175
zend_always_inline static wchar_t * php_win32_ioutil_conv_any_to_w (const char * in , size_t in_len , size_t * out_len )
176
176
{/*{{{*/
177
177
wchar_t * mb , * ret ;
178
- size_t mb_len , dir_len = 0 ;
178
+ size_t mb_len ;
179
+ DWORD dir_len = 0 ;
179
180
180
181
mb = php_win32_cp_conv_any_to_w (in , in_len , & mb_len );
181
182
if (!mb ) {
@@ -227,8 +228,8 @@ zend_always_inline static wchar_t *php_win32_ioutil_conv_any_to_w(const char* in
227
228
memcpy (ret , PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW , PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW * sizeof (wchar_t ));
228
229
#ifndef ZTS
229
230
if (dir_len > 0 ) {
230
- size_t len = GetCurrentDirectoryW (dir_len , dst );
231
- if (len == 0 || len + 1 != dir_len ) {
231
+ DWORD len = GetCurrentDirectoryW (dir_len , dst );
232
+ if (len == 0 || len != dir_len - 1 ) {
232
233
free (ret );
233
234
free (mb );
234
235
return NULL ;
You can’t perform that action at this time.
0 commit comments