Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-05-21 12:40:40 +0300
committerGitHub <noreply@github.com>2021-05-21 12:40:40 +0300
commit4aae71cd77e5117f06cabcc8a3933328f2df6533 (patch)
treeb18deb1b0e5a7151e6d9af3d5eb8d1a499a2e3ac
parentb900d64fd47b1fbc1bcaa688d616da3b14ff5e22 (diff)
parent40929cba799944257e1980038afea6bd176b0c6c (diff)
Merge pull request #27032 from nextcloud/bugfix/noid/log-rotation-error
Fix filesize error on log rotation, if file does not exist
-rw-r--r--lib/public/Log/RotationTrait.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/public/Log/RotationTrait.php b/lib/public/Log/RotationTrait.php
index d7de50410d6..9766c1228b3 100644
--- a/lib/public/Log/RotationTrait.php
+++ b/lib/public/Log/RotationTrait.php
@@ -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;