瀏覽代碼

no invalid json

Laserlicht 2 年之前
父節點
當前提交
fccecf023b
共有 1 個文件被更改,包括 4 次插入0 次删除
  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())
 	{