Bug #62872 [Opn->Nab]: Incorrect behavior of RecursiveDirectoryIterator

From: Date: Wed, 22 Jul 2015 20:16:06 +0000
Subject: Bug #62872 [Opn->Nab]: Incorrect behavior of RecursiveDirectoryIterator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194639@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62872&edit=1 ID: 62872 Updated by: cmb@php.net Reported by: k19808 at rtrtr dot com Summary: Incorrect behavior of RecursiveDirectoryIterator -Status: Open +Status: Not a bug Type: Bug Package: Filesystem function related Operating System: Windows XP SP3 PHP Version: 5.4.6 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Well, that's how RecursiveDirectoryIterator is supposed to work. Previous Comments: ------------------------------------------------------------------------ [2012-08-20 11:07:02] k19808 at rtrtr dot com Description: ------------ Suppose we have a folder "test" in the root of webserver, our script is located in the same folder. There is a file or a folder named "1" in the folder "test". The test script behaves incorrect because of a bug in php. Test script: --------------- $file='./test'; echo "Creating iterator for file: the address is $root.\n"; $file=new RecursiveDirectoryIterator($file,FilesystemIterator::CURRENT_AS_SELF|FilesystemIterator::SKIP_DOTS); echo "Iterator created: the address is ".$root->getPathname()."\n"; Expected result: ---------------- Creating iterator for file: the address is ./test. Iterator created: the address is ./test Actual result: -------------- Creating iterator for file: the address is ./test. Iterator created: the address is ./test\1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62872&edit=1

« previous php.bugs (#194639) next »