From f7f156b537748729f4fc6705563e3e85f2076b9a Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 18 Aug 2018 15:02:42 -0500 Subject: [PATCH] SFTP: use lstat in rawlist instead of stat --- phpseclib/Net/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index c613ea8c..dc4b0df0 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -924,7 +924,7 @@ class Net_SFTP extends Net_SSH2 if ($this->use_stat_cache) { $is_directory = is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $key))); } else { - $stat = $this->stat($dir . '/' . $key); + $stat = $this->lstat($dir . '/' . $key); $is_directory = $stat && $stat['type'] === NET_SFTP_TYPE_DIRECTORY; } }