diff --git a/lib/private/Config.php b/lib/private/Config.php index b044d0731a385..0e3a9b22a7710 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -254,6 +254,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 = "