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 15:50:04 +0300
committerGitHub <noreply@github.com>2021-05-21 15:50:04 +0300
commitfb1362ee30cbf827be47bd64fa8312801830f4f9 (patch)
treecec40a1ce158d7c551ea7f3a0142228cb4f8621e
parentb13dbbb9d782887e791a5e46c08df3868e4b874e (diff)
parent36acbd9efb8a214f11bcbb6ef44d395d9c614481 (diff)
Merge pull request #27058 from nextcloud/backport/27032/stable21
[stable21] 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;