ID:               48746
 Comment by:       phpstuff at cresstone dot com
 Reported By:      ddkees at illinois dot edu
 Status:           Feedback
 Bug Type:         Directory function related
 Operating System: win32 only - Windows Server 2003
 PHP Version:      5.3.0
 Assigned To:      pajoye
 New Comment:

Using Windows 7 x64. It seems all files in my mounted volumes are being
treated as directories. (is_dir returns true, is_file returns false.)
Directory operations pointed at files seem to point back to the root of
the volume.

The following script:
echo "dumping: scandir('mounted_volume')\n";
var_dump(scandir('mounted_volume'));
echo "dumping: scandir('mounted_volume\\file1')\n";
var_dump(scandir('mounted_volume\file1'));

gives this output:



dumping: scandir('mounted_volume')
array(4) {
  [0]=>
  string(12) "$RECYCLE.BIN"
  [1]=>
  string(4) "dir1"
  [2]=>
  string(4) "dir2"
  [3]=>
  string(5) "file1"
}
dumping: scandir('mounted_volume\file1')
array(4) {
  [0]=>
  string(12) "$RECYCLE.BIN"
  [1]=>
  string(4) "dir1"
  [2]=>
  string(4) "dir2"
  [3]=>
  string(5) "file1"
}

Nesting does not seem to matter, eg:
scandir('mounted_volume\dir1\file_in_dir1'); gives the same output


Something else that's interesting... When I create the junction from a
drive letter, eg: "mklink mounted_volume y:" everything works perfectly,
files are files and dirs are dirs. It's only when I use the volume name
in the creation ("mklink /J mounted_volume
\\?\Volume{feeac7c1-2ad0-11de-89bb-001fd0ae05ac}\") that I get this
strange behavior. Bizarre, but I swear I'm not making this up :)


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

[2009-09-02 10:35:32] paj...@php.net

Can't reproduce here. Which OS are you using for this test?

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

[2009-09-02 10:30:20] paj...@php.net

Oh my, I'm about to loose my last hair :)

But we are getting close now... back to code

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

[2009-09-02 10:12:22] phpstuff at cresstone dot com

sorry, found another mounted volume issue:

is_dir reutrns true when passed a file on a mounted volume.
Additionaly, chdir retruns true when passed that file.

eg: is_dir('c:\mounted_volume\image.jpg'); returns true. image.jpg is a
file and mounted_volume is a junction point mounted volume.

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

[2009-09-02 09:31:36] phpstuff at cresstone dot com

Everything seems to be working as of the latest snapshot, thanks.

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

[2009-09-01 17:54:20] paj...@php.net

scandir has been fixed (not directly related to this issue) as well as
the mounted points issues. All regressions should be fixed now. Can you
give it a try please? The next snapshot will have the fixes.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48746

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

Reply via email to