summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-02-15 13:43:54 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-02-15 17:57:06 +0000
commitb3fb30b8b0ebf42996a3a5e4b2a0e22e85614c38 (patch)
tree830b06f4f699a17b998fc1fc6b352202f598b9e4 /lib/private
parenta87f45a6ca51377550cb638878c5ae3d38d02632 (diff)
downloadnextcloud-server-b3fb30b8b0ebf42996a3a5e4b2a0e22e85614c38.tar.gz
nextcloud-server-b3fb30b8b0ebf42996a3a5e4b2a0e22e85614c38.zip
address review by Joas
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Config.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index af6b71e3df3..039f81a75de 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -277,9 +277,10 @@ class Config {
'This can usually be fixed by giving the webserver write access to the config directory.');
}
- // Never write file back if disk space should be low (less than 100 KiB)
+ // Never write file back if disk space should be too low
$df = disk_free_space($this->configDir);
- if ($df !== false && (int)$df < 102400) {
+ $size = strlen($content) + 10240;
+ if ($df !== false && (int)$df < $size) {
throw new \Exception($this->configDir . " does not have enough space for writing the config file! Not writing it back!");
}