diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-07 09:44:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 09:44:57 +0200 |
commit | cd7a6276f27e641cfa8f835c53cd3781e69d1d67 (patch) | |
tree | 625f889ddab63486dd9b8826e5c15011d10d0fab | |
parent | 23c4bc29a466d698b319ea35d302330c27b10865 (diff) | |
parent | 6ca1599ea4327e7a30afa89a7ec08898edb5bc66 (diff) | |
download | nextcloud-server-cd7a6276f27e641cfa8f835c53cd3781e69d1d67.tar.gz nextcloud-server-cd7a6276f27e641cfa8f835c53cd3781e69d1d67.zip |
Merge pull request #21676 from J0WI/fix-chmod-on-fd
Fix chmod on file descriptor
-rw-r--r-- | lib/private/Log/File.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 6be200f6d3e..9e9abb11484 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -82,7 +82,7 @@ class File extends LogDetails implements IWriter, IFileBased { public function write(string $app, $message, int $level) { $entry = $this->logDetailsAsJSON($app, $message, $level); $handle = @fopen($this->logFile, 'a'); - if ($this->logFileMode > 0 && (fileperms($this->logFile) & 0777) != $this->logFileMode) { + if ($this->logFileMode > 0 && is_file($this->logFile) && (fileperms($this->logFile) & 0777) != $this->logFileMode) { @chmod($this->logFile, $this->logFileMode); } if ($handle) { |