From fc0f657774027365e277f4f6fbebe982ba06a8bb Mon Sep 17 00:00:00 2001 From: Pradana Aumars Date: Sat, 12 Jun 2021 11:01:50 +0200 Subject: [PATCH] Fix conf_verify_key --- src/conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf.c b/src/conf.c index 1d9328f..ebf6123 100644 --- a/src/conf.c +++ b/src/conf.c @@ -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; }