diff --git a/lib/private/Config.php b/lib/private/Config.php index 37708357339c1..ba3b8c6fe4d36 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -262,6 +262,10 @@ private function readData() { private function writeData() { $this->checkReadOnly(); + if (!is_file(\OC::$configDir.'/CAN_INSTALL') && !isset($this->cache['version'])) { + throw new HintException(sprintf('Configuration was not read or initialized correctly, not overwriting %s', $this->configFilePath)); + } + // Create a php file ... $content = "