mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-11 06:43:56 +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
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue