|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-16 12:48 UTC] langemeijer@php.net
-Status: Open
+Status: Verified
[2012-06-16 12:48 UTC] langemeijer@php.net
[2012-06-16 13:42 UTC] langemeijer@php.net
[2012-06-16 13:46 UTC] langemeijer@php.net
-Status: Verified
+Status: Closed
-Assigned To:
+Assigned To: langemeijer
[2012-06-16 13:46 UTC] langemeijer@php.net
[2015-11-06 20:38 UTC] ken at pardiac dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 03:00:01 2025 UTC |
Description: ------------ When trying to read a file or directory via the ssh2.sftp protocol wrapper which contains a '#' in the path ssh2.sftp will ignore it. It looks like it treats the '#' as a start comment command (e.g. // in PHP) In the test script, i have used the following directory structure: #Test/ a Test#/ b Test/ c Note that creating the directories from the bash shell requires escaping the # with a \, e.g.: mkdir \#Test Reproduce code: --------------- // $sftp is a ssh2_sftp resource // $dir is the directory containing the test directory structure (see description) $root = "ssh2.sftp://$sftp/$dir"; $a = scandir("$root/#Test"); // $a = array(".", "..", "#Test", "Test#", "Test"); // Note that $a is a dir listing of $root, everything after the # is ignored $b = scandir("$root/Test#"); // $b = array(".", "..", "c"); // Gives a listing of Test not of Test# Expected result: ---------------- $a = array(".", "..", "a"); $b = array(".", "..", "b"); Actual result: -------------- $a = array(".", "..", "#Test", "Test#", "Test"); $b = array(".", "..", "c");