mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 08:10:58 +00:00
SFTP: nlist() didn't return empty directories - now it does
I view this as a BC breaking change so atm do not plan on backporting it to 1.0/2.0. eg. now, all subdirectories have . and .. as "files" whereas before they didn't
This commit is contained in:
parent
47280b4e44
commit
8ce392f218
@ -837,9 +837,7 @@ class SFTP extends SSH2
|
|||||||
$result = [];
|
$result = [];
|
||||||
foreach ($files as $value) {
|
foreach ($files as $value) {
|
||||||
if ($value == '.' || $value == '..') {
|
if ($value == '.' || $value == '..') {
|
||||||
if ($relativeDir == '') {
|
$result[] = $relativeDir . $value;
|
||||||
$result[] = $value;
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (is_array($this->query_stat_cache($this->realpath($dir . '/' . $value)))) {
|
if (is_array($this->query_stat_cache($this->realpath($dir . '/' . $value)))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user