aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-03-11 16:02:40 +0100
committerGitHub <noreply@github.com>2022-03-11 16:02:40 +0100
commitbcb1fc5a81231a0610c180212648f47eeb69e957 (patch)
tree851326563f758dc4d3f1ca91a9e0b9cc3a15fa75 /apps
parentdb1c2a5375d5a21aaaf35615b247c0e0f33a815e (diff)
parente81eaf45d25268b947fa998f3cd2219258c750aa (diff)
downloadnextcloud-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.php3
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';
}