Merge pull request #27058 from nextcloud/backport/27032/stable21
[stable21] Fix filesize error on log rotation, if file does not exist
This commit is contained in:
commit
fb1362ee30
|
@ -58,7 +58,7 @@ trait RotationTrait {
|
|||
* @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;
|
||||
|
|
Loading…
Reference in New Issue