Explorar o código

Merge pull request #2936 from Laserlicht/json_fix

[fix] no invalid json
Ivan Savenko %!s(int64=2) %!d(string=hai) anos
pai
achega
ad4c92b6e1
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      lib/CConfigHandler.cpp

+ 4 - 0
lib/CConfigHandler.cpp

@@ -65,7 +65,11 @@ void SettingsStorage::init(const std::string & dataFilename, const std::string &
 
 	// Probably new install. Create config file to save settings to
 	if (!CResourceHandler::get("local")->existsResource(confName))
+	{
 		CResourceHandler::get("local")->createResource(dataFilename);
+		if(schema.empty())
+			invalidateNode(std::vector<std::string>());
+	}
 
 	if(!schema.empty())
 	{