summaryrefslogtreecommitdiffstats
path: root/source/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/theme.c')
-rw-r--r--source/theme.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/theme.c b/source/theme.c
index bc5bfe25..bc322461 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -4,6 +4,7 @@
#include <string.h>
#include "theme.h"
#include "lexer/theme-parser.h"
+#include "helper.h"
void yyerror ( YYLTYPE *ylloc, const char *);
Widget *rofi_theme_find_or_create_class ( Widget *base, const char *class )
@@ -150,13 +151,16 @@ void rofi_theme_widget_add_properties ( Widget *widget, GHashTable *table )
void rofi_theme_parse_file ( const char *file )
{
- yyin = fopen ( file, "rb");
+ char *filename = rofi_expand_path ( file );
+ yyin = fopen ( filename, "rb");
if ( yyin == NULL ){
- fprintf(stderr, "Failed to open file: '%s'\n", strerror ( errno ) );
+ fprintf(stderr, "Failed to open file: %s: '%s'\n", filename, strerror ( errno ) );
+ g_free(filename);
return;
}
while ( yyparse() );
yylex_destroy();
+ g_free(filename);
}
static Widget *rofi_theme_find_single ( Widget *widget, const char *name)
{