mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-04-10 10:51:51 +00:00
Merge pull request #420 from bantu/sftp-skip-current-dir-by-removal
SFTP: Do not check filename over and over again, remove '.' and '..' from the map instead. * bantu/sftp-skip-current-dir-by-removal: Do not check filename over and over again, remove '.' and '..' from the map instead.
This commit is contained in:
commit
880bc9d9e6
@ -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…
x
Reference in New Issue
Block a user