Bug #51804 [Opn->Asn]: SplFileInfo::getLinkTarget() Fails.
| From: | johannes@php.net | Date: | Fri, 06 Aug 2010 23:56:07 +0000 |
| Subject: | Bug #51804 [Opn->Asn]: SplFileInfo::getLinkTarget() Fails. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153196@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51804&edit=1
ID: 51804
Updated by: johannes@php.net
Reported by: v-sumada at microsoft dot com
Summary: SplFileInfo::getLinkTarget() Fails.
-Status: Open
+Status: Assigned
Type: Bug
Package: SPL related
Operating System: All Windows OS
PHP Version: 5.3SVN-2010-05-13 (SVN)
-Assigned To:
+Assigned To: pajoye
Block user comment: N
New Comment:
Pierre, I think you played with symlinks before, can you add the magic
needed, here?
Previous Comments:
------------------------------------------------------------------------
[2010-05-13 03:36:36] v-sumada at microsoft dot com
Description:
------------
SplFileInfo::getLinkTarget() fails .we have a filesymlink created for a
file (filesymbolic.txt) and tried to read the target of the filesymlink
created and it returns an error .This happens for Directory also.
When this Function used on accessing symlinks over remote share it
returns an error with 'Bad File Descriptor'.
Test script:
---------------
<?php
$filename = dirname(__FILE__)."\\filesymlink";
var_dump(file_exists($filename));
$filesyminfo = new SplFileInfo($filename);
var_dump($filesyminfo->getLinkTarget());
?>
Expected result:
----------------
bool(true)
string(16) filesymbolic.txt
Actual result:
--------------
bool(true)
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable
to read link C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\htdocs\symlinktodir, error: No such file or
directory' in C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\htdocs\getLinkTarget.php:5 Stack trace: #0
C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\htdocs\getLinkTarget.php(5):
SplFileInfo->getLinkTarget() #1 {main} thrown in C:\Program Files
(x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php on
line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51804&edit=1