Merge pull request #730 from terrafrost/disable-stat-cache-1.0

SFTP: don't update stat cache when it's been disabled

* terrafrost/disable-stat-cache-1.0:
  SFTP: don't update stat cache when it's been disabled
This commit is contained in:
Andreas Fischer 2015-07-06 23:48:28 +02:00
commit 7f1dfba50d

View File

@ -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));