summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-04-19 16:24:13 +0200
committerDave Davenport <qball@gmpclient.org>2020-04-19 16:24:17 +0200
commited55b6c634bd787cc9955eb250be43cc864c49ab (patch)
treeeb5f9a74a232e7125e33c71263bff0d062fa3f97
parent4689e6ee6d40fb1b99cf339df9bd5190d924904f (diff)
check before xresource config file parsing if it exist
-rw-r--r--source/rofi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 5fdd02e7..73c1ecd1 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -916,6 +916,7 @@ int main ( int argc, char *argv[] )
}
// Load in config from X resources.
config_parse_xresource_options ( xcb );
+
if ( config_path_new && g_file_test ( config_path_new, G_FILE_TEST_IS_REGULAR ) ) {
if ( rofi_theme_parse_file ( config_path_new ) ) {
rofi_theme_free ( rofi_theme );
@@ -925,8 +926,10 @@ int main ( int argc, char *argv[] )
else {
g_free ( config_path_new );
config_path_new = NULL;
- config_parse_xresource_options_file ( config_path );
- old_config_format = TRUE;
+ if ( g_file_test ( xetc, G_FILE_TEST_IS_REGULAR ) ) {
+ config_parse_xresource_options_file ( config_path );
+ old_config_format = TRUE;
+ }
}
}
find_arg_str ( "-theme", &( config.theme ) );