mirror of
https://github.com/php/php-src.git
synced 2026-04-22 07:28:09 +02:00
3ccc0409ce
This is a re-application of the original match against master. The patch was originally applied to master, then reverted from there, incorrectly applied to PHP-8.0, reverted from there due to ABI break, and now lands on master again. We can only hope that it does not get reverted again ;)
25 lines
785 B
PHP
25 lines
785 B
PHP
--TEST--
|
|
Fix #80960 (opendir() warning wrong info when failed on Windows)
|
|
--SKIPIF--
|
|
<?php
|
|
if (PHP_OS_FAMILY !== "Windows") die("skip for Windows only");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
opendir("notexist*");
|
|
opendir("notexist?");
|
|
opendir(str_pad("longname", PHP_MAXPATHLEN - strlen(getcwd()), "_"));
|
|
?>
|
|
--EXPECTF--
|
|
Warning: opendir(notexist*): %s (code: 123) in %s on line %d
|
|
|
|
Warning: opendir(notexist*): Failed to open directory: No such file or directory in %s on line %d
|
|
|
|
Warning: opendir(notexist?): %s (code: 123) in %s on line %d
|
|
|
|
Warning: opendir(notexist?): Failed to open directory: No such file or directory in %s on line %d
|
|
|
|
Warning: opendir(longname%r_+%r): %s (code: 111) in %s on line %d
|
|
|
|
Warning: opendir(longname%r_+%r): Failed to open directory: Filename too long in %s on line %d
|