Merge pull request #47974 from nextcloud/backport/47968/stable28

This commit is contained in:
John Molakvoæ 2024-09-14 20:24:34 +02:00 committed by GitHub
commit a8522a7d48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -471,10 +471,14 @@ class SFTP extends Common {
try {
$stat = $this->getConnection()->stat($this->absPath($path));
$mtime = $stat ? (int)$stat['mtime'] : -1;
$size = $stat ? (int)$stat['size'] : 0;
$mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1;
$size = isset($stat['size']) ? (int)$stat['size'] : 0;
return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1];
return [
'mtime' => $mtime,
'size' => $size,
'ctime' => -1
];
} catch (\Exception $e) {
return false;
}