ID:               50932
 User updated by:  draeli at draeli dot com
 Reported By:      draeli at draeli dot com
 Status:           Open
 Bug Type:         SPL related
 Operating System: win32 only -Windows
 PHP Version:      5.3.1
 New Comment:

I realized that I had used the wrong word in 'Expected result' part.
Problem is with 'dot' and not 'commat'.
Sorry for this miss.


Previous Comments:
------------------------------------------------------------------------

[2010-02-04 18:54:48] draeli at draeli dot com

Description:
------------
Under Windows (XP Sp3), I have create a dir (with mkdir function) named
'Chouja Reideen - Love is..', when I read dir with SPL
"RecursiveDirectoryIterator" and call method 'getType', I have this
error message : "RuntimeException: SplFileInfo::getType()
[splfileinfo.gettype]: Lstat".
Too, when I try to rename (with rename function), I have this error
message "No such file or directory".
Dir really exist (with "getPathname" call method, name is correct) and
I can't rename with system rename properties or MSDos rename function
(and I have no solution to remove this dir ...).

Reproduce code:
---------------
foreach (new \RecursiveIteratorIterator(new
\RecursiveDirectoryIterator('E:\directoryTest'),
\RecursiveIteratorIterator::SELF_FIRST) as $objCur) {
        echo '<hr />';
        if ( preg_match('@^E:\\\directoryTest(.*)\...@u',
$objCur->getPathname(), $out) ){
                rename($objCur->getPathname(), 'E:\directoryTest\\' . $out[1]);
                var_dump($out[1]);
        }
        echo $objCur->getPathname() . '<br />';
        echo $objCur->getType() . '<br />';
}

Expected result:
----------------
List all file under a primary dir and rename file finish with one or
more commat.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50932&edit=1

Reply via email to