1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Files
archived-php-src/ext/standard/tests/file/bug78296.phpt
T
Christoph M. Becker bb735c9e9e Fix #78296: is_file fails to detect file
If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code.  It
might be sensible to change that for `master`, though.
2019-12-02 11:29:10 +01:00

17 lines
279 B
PHP

--TEST--
Bug #78296 (is_file fails to detect file)
--FILE--
<?php
$dir = str_pad(__DIR__ . '/bug78296', 250, '_');
var_dump(mkdir($dir));
var_dump(is_dir($dir));
?>
--EXPECT--
bool(true)
bool(true)
--CLEAN--
<?php
$dir = str_pad(__DIR__ . '/bug78296', 250, '_');
rmdir($dir);
?>