Skip to content

Commit bcb1fc5

Browse files
authored
Merge pull request #31531 from nextcloud/fix/sftp-offset
2 parents db1c2a5 + e81eaf4 commit bcb1fc5

File tree

1 file changed

+3
-0
lines changed
  • apps/files_external/lib/Lib/Storage

1 file changed

+3
-0
lines changed

apps/files_external/lib/Lib/Storage/SFTP.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ public function opendir($path) {
327327
public function filetype($path) {
328328
try {
329329
$stat = $this->getConnection()->stat($this->absPath($path));
330+
if (!is_array($stat) || !array_key_exists('type', $stat)) {
331+
return false;
332+
}
330333
if ((int) $stat['type'] === NET_SFTP_TYPE_REGULAR) {
331334
return 'file';
332335
}

0 commit comments

Comments
 (0)