Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-03-11 18:02:40 +0300
committerGitHub <noreply@github.com>2022-03-11 18:02:40 +0300
commitbcb1fc5a81231a0610c180212648f47eeb69e957 (patch)
tree851326563f758dc4d3f1ca91a9e0b9cc3a15fa75
parentdb1c2a5375d5a21aaaf35615b247c0e0f33a815e (diff)
parente81eaf45d25268b947fa998f3cd2219258c750aa (diff)
Merge pull request #31531 from nextcloud/fix/sftp-offset
-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';
}