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:
terrafrost 2019-03-16 09:41:06 -05:00
parent 47280b4e44
commit 8ce392f218
1 changed files with 1 additions and 3 deletions

View File

@ -837,9 +837,7 @@ class SFTP extends SSH2
$result = [];
foreach ($files as $value) {
if ($value == '.' || $value == '..') {
if ($relativeDir == '') {
$result[] = $value;
}
$result[] = $relativeDir . $value;
continue;
}
if (is_array($this->query_stat_cache($this->realpath($dir . '/' . $value)))) {