Merge pull request #47976 from nextcloud/backport/47968/stable30

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

View file

@ -441,10 +441,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;
}