diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-03-11 18:02:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 18:02:40 +0300 |
commit | bcb1fc5a81231a0610c180212648f47eeb69e957 (patch) | |
tree | 851326563f758dc4d3f1ca91a9e0b9cc3a15fa75 /apps/files_external | |
parent | db1c2a5375d5a21aaaf35615b247c0e0f33a815e (diff) | |
parent | e81eaf45d25268b947fa998f3cd2219258c750aa (diff) |
Merge pull request #31531 from nextcloud/fix/sftp-offset
Diffstat (limited to 'apps/files_external')
-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'; } |