#41155 [Opn]: Virtual drives return "failed to open dir: Bad file descriptor"
| From: | fantasysportswire at yahoo dot com | Date: | Sat, 21 Apr 2007 08:15:55 +0000 |
| Subject: | #41155 [Opn]: Virtual drives return "failed to open dir: Bad file descriptor" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111763@lists.php.net to get a copy of this message | ||
ID: 41155
User updated by: fantasysportswire at yahoo dot com
Reported By: fantasysportswire at yahoo dot com
Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: WINXP SP 2
PHP Version: 5.2.1
New Comment:
It also occurs with 5.2.2RC2-dev
Previous Comments:
------------------------------------------------------------------------
[2007-04-21 08:12:39] fantasysportswire at yahoo dot com
Description:
------------
If I use scandir on a virtual drive it returns:
Warning: scandir(w:): failed to open dir: Bad file descriptor
I have also tried w:\ and w:/ to the same result.
However... scandir("w:\\folder") works just fine.
realpath does almost the same thing... if from w: I run a script with:
<?
echo realpath(".");
?>
and run it like
php -n script.php
... I get nothing
If I go into "folder" and run it
php -n w:\script.php
I returns
w:\folder
Just to repeat - this only seems to happen in a Virtual (subst) root
path. Inside folders in the virtual path work fine.
Both incidents happen using the -n flag, so there is no possible
setting issue.
Reproduce code:
---------------
<?
echo realpath(".")."\n";
print_r(scandir("."));
?>
Expected result:
----------------
Current Path and an array dump of the files.
Actual result:
--------------
Nothing for realpath and "Warning: scandir(w:): failed to open dir: Bad
file descriptor" for scandir
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41155&edit=1