Skip to content

Commit

Permalink
Merge pull request #27058 from nextcloud/backport/27032/stable21
Browse files Browse the repository at this point in the history
[stable21] Fix filesize error on log rotation, if file does not exist
  • Loading branch information
blizzz authored May 21, 2021
2 parents b13dbbb + 36acbd9 commit fb1362e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/public/Log/RotationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function rotate():string {
* @since 14.0.0
*/
protected function shouldRotateBySize():bool {
if ((int)$this->maxSize > 0) {
if ((int)$this->maxSize > 0 && file_exists($this->filePath)) {
$filesize = @filesize($this->filePath);
if ($filesize >= (int)$this->maxSize) {
return true;
Expand Down

0 comments on commit fb1362e

Please sign in to comment.