From 109ae38e4866f5bc06769559705025679bf2c64e Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 4 Jul 2015 12:19:35 -0500 Subject: [PATCH] SFTP: don't update stat cache when it's been disabled --- phpseclib/Net/SFTP.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 7b77f074..8b08f9cd 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -1062,6 +1062,10 @@ class Net_SFTP extends Net_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));