From: Christoph M. Becker Date: Mon, 17 Jun 2019 14:44:49 +0000 (+0200) Subject: Improve create_verify_dir() diagnostics X-Git-Tag: php-7.4.0alpha2~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e58e2fd0d49c0509b7aebc66f74dd003904cfb74;p=php Improve create_verify_dir() diagnostics If create_verify_dir() fails[1], we need more info why that happened. [1] --- diff --git a/ext/standard/tests/file/windows_mb_path/util.inc b/ext/standard/tests/file/windows_mb_path/util.inc index de4072a1aa..fc80a7613f 100644 --- a/ext/standard/tests/file/windows_mb_path/util.inc +++ b/ext/standard/tests/file/windows_mb_path/util.inc @@ -94,8 +94,14 @@ function create_verify_dir($prefix, $basename, $cp = 65001) { $full = $prefix . DIRECTORY_SEPARATOR . $basename; - if (!mkdir($full) || get_basename_with_cp($full, $cp, false) !== $basename) { + if (!mkdir($full)) { echo "failed to create dir '$full'\n"; + return; + } + + $now = get_basename_with_cp($full, $cp, false); + if ($now !== $basename) { + echo "expected '$basename', got '$now'\n"; } }