diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 36e1fc4d..dfd7d9f6 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -1023,6 +1023,10 @@ class SFTP extends SSH2 */ function _update_stat_cache($path, $value) { + if ($this->use_stat_cache === false) { + return; + } + // preg_replace('#^/|/(?=/)|/$#', '', $dir) == str_replace('//', '/', trim($path, '/')) $dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));