mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #31531 from nextcloud/fix/sftp-offset
This commit is contained in:
commit
bcb1fc5a81
1 changed files with 3 additions and 0 deletions
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue