mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Fix a bug which may cause crash at startup on some platforms
This commit is contained in:
1 file changed
+7
-3
+7
-3
@@ -568,9 +568,13 @@ void readConf()
|
||||
|
||||
try
|
||||
{
|
||||
YAML::Node yaml = YAML::LoadFile(pref_path);
|
||||
if(yaml.size() && yaml["common"])
|
||||
return readYAMLConf(yaml);
|
||||
std::string prefdata = fileGet(pref_path, false);
|
||||
if(prefdata.find("common:") != prefdata.npos)
|
||||
{
|
||||
YAML::Node yaml = YAML::Load(prefdata);
|
||||
if(yaml.size() && yaml["common"])
|
||||
return readYAMLConf(yaml);
|
||||
}
|
||||
}
|
||||
catch (YAML::Exception &e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user