Skip to content

Commit

Permalink
Merge pull request #47968 from nextcloud/fixKeyExFileExt
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Sep 14, 2024
2 parents a751ff7 + 07a6fd1 commit 34d07fe
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 @@ -441,10 +441,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 34d07fe

Please sign in to comment.