Write default values to config on get

This commit is contained in:
Bepis committed 2018-03-03 14:41:17 +11:00
1 parent 0acf245fec
commit 79e1446bd6
1 file changed
+6
+6
View File
@@ -60,12 +60,18 @@ namespace BepInEx
Dictionary<string, string> subdict;
if (!cache.TryGetValue(section, out subdict))
{
SetEntry(key, defaultValue, section);
return defaultValue;
}
if (subdict.TryGetValue(key, out string value))
return value;
else
{
SetEntry(key, defaultValue, section);
return defaultValue;
}
}
/// <summary>