mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
SFTP: Use the correct stat cache property: stat_cache
This commit is contained in:
parent
4e0b3a5c3c
commit
f1fbf9c5ae
@ -942,7 +942,7 @@ class Net_SFTP extends Net_SSH2
|
|||||||
// preg_replace('#^/|/(?=/)|/$#', '', $dir) == str_replace('//', '/', trim($path, '/'))
|
// preg_replace('#^/|/(?=/)|/$#', '', $dir) == str_replace('//', '/', trim($path, '/'))
|
||||||
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
||||||
|
|
||||||
$temp = &$this->cache;
|
$temp = &$this->stat_cache;
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
if (!isset($temp[$dir])) {
|
if (!isset($temp[$dir])) {
|
||||||
$temp[$dir] = array();
|
$temp[$dir] = array();
|
||||||
@ -965,7 +965,7 @@ class Net_SFTP extends Net_SSH2
|
|||||||
{
|
{
|
||||||
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
||||||
|
|
||||||
$temp = &$this->cache;
|
$temp = &$this->stat_cache;
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
if ($dir == end($dirs)) {
|
if ($dir == end($dirs)) {
|
||||||
unset($temp[$dir]);
|
unset($temp[$dir]);
|
||||||
@ -991,7 +991,7 @@ class Net_SFTP extends Net_SSH2
|
|||||||
{
|
{
|
||||||
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
$dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
|
||||||
|
|
||||||
$temp = &$this->cache;
|
$temp = &$this->stat_cache;
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
if (!isset($temp[$dir])) {
|
if (!isset($temp[$dir])) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user