diff --git a/lib/private/Config.php b/lib/private/Config.php index 2a83d2300dcd4..a1753c8be3189 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -239,6 +239,10 @@ private function readData() { * @throws \Exception If no file lock can be acquired */ private function writeData() { + 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 = "