mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-12 09:09:39 +01:00
Merge branch 'master' into php5
* master: Do not check filename over and over again, remove '.' and '..' from the map instead.
This commit is contained in:
commit
bb1c36893f
@ -1516,11 +1516,8 @@ class Net_SFTP extends Net_SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($entries['.'], $entries['..']);
|
||||||
foreach ($entries as $filename=>$props) {
|
foreach ($entries as $filename=>$props) {
|
||||||
if ($filename == '.' || $filename == '..') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($props['type'])) {
|
if (!isset($props['type'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2148,11 +2145,8 @@ class Net_SFTP extends Net_SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($entries['.'], $entries['..']);
|
||||||
foreach ($entries as $filename=>$props) {
|
foreach ($entries as $filename=>$props) {
|
||||||
if ($filename == '.' || $filename == '..') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($props['type'])) {
|
if (!isset($props['type'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user