Skip to content

Commit

Permalink
Merge pull request #47975 from nextcloud/backport/47968/stable29
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Sep 14, 2024
2 parents 250e0a9 + 6168412 commit 5f28aaa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions apps/files_external/lib/Lib/Storage/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,14 @@ public function stat($path) {
try {
$stat = $this->getConnection()->stat($this->absPath($path));

$mtime = $stat ? (int)$stat['mtime'] : -1;
$size = $stat ? (int)$stat['size'] : 0;

return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1];
$mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1;
$size = isset($stat['size']) ? (int)$stat['size'] : 0;

return [
'mtime' => $mtime,
'size' => $size,
'ctime' => -1
];
} catch (\Exception $e) {
return false;
}
Expand Down

0 comments on commit 5f28aaa

Please sign in to comment.