Skip to content

Commit

Permalink
Merge pull request #31531 from nextcloud/fix/sftp-offset
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Mar 11, 2022
2 parents db1c2a5 + e81eaf4 commit bcb1fc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/files_external/lib/Lib/Storage/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ public function opendir($path) {
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';
}
Expand Down

0 comments on commit bcb1fc5

Please sign in to comment.