Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix handling of non existing files in SFTP::filetype
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Feb 15, 2022
commit c23da8a1b6f7e636c26aef4f8858cdecb5b73431
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 ($stat === false) {
return false;
}
if ((int) $stat['type'] === NET_SFTP_TYPE_REGULAR) {
return 'file';
}
Expand Down