]> granicus.if.org Git - php/commit
php_zip_pcre: Match pattern before stating for directories
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 6 Jun 2019 09:46:23 +0000 (11:46 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 6 Jun 2019 09:46:23 +0000 (11:46 +0200)
commit3372f2cf2cd90e899c3b412ec38f2eebc7e106b3
treed567dfee186362409ad950b7dff2fe8a6ce229b3
parentb2b528b97325e243d6c18e55b3a5fcb1cf19641a
php_zip_pcre: Match pattern before stating for directories

For two reasons: First, it's generally cheaper to match a regex than
perform a stat (especially on Windows). Second, it will not fail on
concurrent modification of a directory in parts that are not matched
by the pattern, such as the spurious failure in ext/zip/tests/bug72660.phpt.
ext/zip/php_zip.c