mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-27 04:46:26 +01: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 = [];
|
||||
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)))) {
|
||||
|
Loading…
Reference in New Issue
Block a user