Edit report at http://bugs.php.net/bug.php?id=51766&edit=1
ID: 51766 Updated by: paj...@php.net Reported by: v-sumada at microsoft dot com Summary: SplFileInfo::isLink() Fails for Symlinks on windows -Status: Assigned +Status: Closed Type: Bug Package: SPL related Operating System: All Windows OS PHP Version: 5.3.2 Assigned To: pajoye Block user comment: N New Comment: Patch applied to PHP_5_3 and trunk, fixing is_link and SPL's related methods. Previous Comments: ------------------------------------------------------------------------ [2010-08-31 10:53:01] paj...@php.net The following patch has been added/updated: Patch Name: add_lstat_support Revision: 1283244780 URL: http://bugs.php.net/patch-display.php?bug=51766&patch=add_lstat_support&revision=1283244780 ------------------------------------------------------------------------ [2010-08-30 19:48:33] paj...@php.net The following patch has been added/updated: Patch Name: lstat-support-1 Revision: 1283190512 URL: http://bugs.php.net/patch-display.php?bug=51766&patch=lstat-support-1&revision=1283190512 ------------------------------------------------------------------------ [2010-08-30 19:46:44] paj...@php.net This patch http://pastie.org/1127049 fixes this issue (along other). ------------------------------------------------------------------------ [2010-08-07 01:56:33] johan...@php.net Pierre, I think you played with symlinks on Windows before, can you add the magic needed, here? ------------------------------------------------------------------------ [2010-05-07 19:08:08] v-sumada at microsoft dot com Description: ------------ SplFileInfo::isLink() Which returns False for Symbolic links on all windows OS. we have a File Symbolic link created for a file and tried to test whether the referenced file by SplFileInfo is symbolic link or not. In the above script we have a symlink(filesymlink)created for a file 'testfile' and tried to check with the file_exists function for symlink(filesymlink) which returns true and it returns false for the SplFileInfo::isLink(). Test script: --------------- <?php $symlinkname = "/path/to/filesymlink"; $fileinfo = new SplFileInfo($symlinkname); var_dump(file_exists($symlinkname)); var_dump($fileinfo->isLink()); ?> Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51766&edit=1