GU mode: use default config file if argument --config and --session are not set

This commit is contained in:
matlabbe 2018-08-31 12:01:03 -04:00
parent 0424bf181c
commit eefd6c6ff6

View File

@ -429,6 +429,10 @@ int main(int argc, char* argv[])
if(sessionNew) if(sessionNew)
{ {
UINFO(" Session path: \"%s\" [NEW]", sessionPath.toStdString().c_str()); UINFO(" Session path: \"%s\" [NEW]", sessionPath.toStdString().c_str());
if(configPath.isEmpty() && guiMode)
{
configPath = find_object::Settings::iniDefaultPath();
}
} }
else else
{ {
@ -451,6 +455,10 @@ int main(int argc, char* argv[])
} }
} }
} }
else if(configPath.isEmpty() && guiMode)
{
configPath = find_object::Settings::iniDefaultPath();
}
if(!objectsPath.isEmpty()) if(!objectsPath.isEmpty())
{ {
UINFO(" Objects path: \"%s\"", objectsPath.toStdString().c_str()); UINFO(" Objects path: \"%s\"", objectsPath.toStdString().c_str());