From 13601fb89277ca5e8e71f0f13c8e17fb64ae1343 Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Fri, 1 Apr 2016 09:33:57 +0200 Subject: [PATCH] rofi: Fix g_file_test calls G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR will return TRUE even for directory. Signed-off-by: Quentin Glidic --- source/rofi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index 07fda651..cc0b4e80 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -434,7 +434,7 @@ static inline void load_configuration ( ) char *config_path = NULL; // Load distro default settings gchar *etc = g_build_filename ( G_DIR_SEPARATOR_S, "etc", "rofi.conf", NULL ); - if ( g_file_test ( etc, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) ) { + if ( g_file_test ( etc, G_FILE_TEST_IS_REGULAR ) ) { config_parse_xresource_options_file ( etc ); config_parse_xresource_options_dynamic_file ( etc ); } @@ -455,7 +455,7 @@ static inline void load_configuration ( ) config_path = rofi_expand_path ( c ); } if ( config_path != NULL ) { - if ( g_file_test ( config_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) ) { + if ( g_file_test ( config_path, G_FILE_TEST_IS_REGULAR ) ) { // Load config from config file. config_parse_xresource_options_file ( config_path ); config_parse_xresource_options_dynamic_file ( config_path ); @@ -466,7 +466,7 @@ static inline void load_configuration ( ) // Load theme file if ( cpath ) { char *theme_path = g_build_filename ( cpath, "rofi", "theme", NULL ); - if ( g_file_test ( theme_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) ) { + if ( g_file_test ( theme_path, G_FILE_TEST_IS_REGULAR ) ) { config_parse_xresource_options_file ( theme_path ); config_parse_xresource_options_dynamic_file ( theme_path ); }