Fix conf_verify_key
This commit is contained in:
parent
d15c8a688e
commit
fc0f657774
|
@ -13,22 +13,22 @@ conf_verify_key(const char *f, const char *key, char *value)
|
|||
|
||||
if (!g_key_file_load_from_file (key_file, f, G_KEY_FILE_NONE, &error))
|
||||
{
|
||||
if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
|
||||
if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
|
||||
g_warning ("Error loading key file: %s\n", error->message);
|
||||
return 1;
|
||||
}
|
||||
|
||||
value = g_key_file_get_string (key_file, "Global", key, &error);
|
||||
if (value == NULL &&
|
||||
!g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
|
||||
g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
|
||||
{
|
||||
g_warning ("Error finding key in key file: %s\n", error->message);
|
||||
return 1;
|
||||
}
|
||||
else if (value == NULL)
|
||||
{
|
||||
g_warning ("Error finding game directory.\n");
|
||||
g_warning ("Error: %s.\n", error->message);
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Reference in New Issue