mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] config: print error when app:configFile is not a valid file
This makes it clear to the user that app:configFile is at fault.
This commit is contained in:
parent
64c906b801
commit
b8b70e772e
@ -503,6 +503,12 @@ bool config_load(int argc, char * argv[])
|
||||
const char * configFile = option_get_string("app", "configFile");
|
||||
if (configFile)
|
||||
{
|
||||
if (stat(configFile, &st) < 0 || !S_ISREG(st.st_mode))
|
||||
{
|
||||
DEBUG_ERROR("app:configFile set to invalid file: %s", configFile);
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_INFO("Loading config from: %s", configFile);
|
||||
if (!option_load(configFile))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user