Bug #50932 [Fbk->NoF]: RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat

From: Date: Sun, 02 Sep 2018 09:33:58 +0000
Subject: Bug #50932 [Fbk->NoF]: RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216847@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50932&edit=1

 ID:                 50932
 Updated by:         cmb@php.net
 Reported by:        draeli at draeli dot com
 Summary:            RuntimeException: SplFileInfo::getType()
                     [splfileinfo.gettype]: Lstat
-Status:             Feedback
+Status:             No Feedback
 Type:               Bug
 Package:            SPL related
 Operating System:   win32 only -Windows
 PHP Version:        5.3.1
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2018-08-18 13:11:00] cmb@php.net

> […] I can't rename with system rename properties or MSDos rename
> function […]

Then why do you think this would be a PHP issue?

> […] and I have no solution to remove this dir […]

Use the folders short name (see dir /X).

------------------------------------------------------------------------
[2010-02-04 23:12:34] draeli at draeli dot com

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

------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=50932&edit=1


Thread (3 messages)

« previous php.bugs (#216847) next »