diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-03-11 16:02:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 16:02:40 +0100 |
commit | bcb1fc5a81231a0610c180212648f47eeb69e957 (patch) | |
tree | 851326563f758dc4d3f1ca91a9e0b9cc3a15fa75 /apps | |
parent | db1c2a5375d5a21aaaf35615b247c0e0f33a815e (diff) | |
parent | e81eaf45d25268b947fa998f3cd2219258c750aa (diff) | |
download | nextcloud-server-bcb1fc5a81231a0610c180212648f47eeb69e957.tar.gz nextcloud-server-bcb1fc5a81231a0610c180212648f47eeb69e957.zip |
Merge pull request #31531 from nextcloud/fix/sftp-offset
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index ae049007cdc..e46f60d0be4 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -327,6 +327,9 @@ class SFTP extends \OC\Files\Storage\Common { public function filetype($path) { try { $stat = $this->getConnection()->stat($this->absPath($path)); + if (!is_array($stat) || !array_key_exists('type', $stat)) { + return false; + } if ((int) $stat['type'] === NET_SFTP_TYPE_REGULAR) { return 'file'; } |