#50932 [NEW]: RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat
From: draeli at draeli dot com
Operating system: Windows
PHP version: 5.3.1
PHP Bug Type: SPL related
Bug description: RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat
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 bug report at http://bugs.php.net/?id=50932&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50932&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50932&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50932&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50932&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50932&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50932&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50932&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50932&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50932&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50932&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50932&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50932&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50932&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50932&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50932&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50932&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50932&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50932&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50932&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50932&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50932&r=mysqlcfg
Thread (3 messages)
- draeli at draeli dot com