summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-05-22 15:58:27 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-04-08 11:09:01 +0200
commit685218c5a75a1e7c84e7b5536a527cf92201121b (patch)
treec1144f66f5c1b93421fef9a31a50ac94553ed023 /src/options.c
parentbc13f70153cdad3e836a3c55d2a80fc85956d5d5 (diff)
do not depend on HOME being set
this introduces a bug in feh_wm_set_bg, which will be fixed in the next commit (only applies when run without HOME)
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/options.c b/src/options.c
index 7542cd5..8fbdbfb 100644
--- a/src/options.c
+++ b/src/options.c
@@ -132,15 +132,16 @@ static void feh_load_options_for_theme(char *theme)
int cont = 0;
int bspos;
- if (!home)
- eprintf("You have no HOME, cannot read themes");
-
- oldrcpath = estrjoin("/", home, ".fehrc", NULL);
-
if (confbase)
rcpath = estrjoin("/", confbase, "feh/themes", NULL);
- else
+ else if (home)
rcpath = estrjoin("/", home, ".config/feh/themes", NULL);
+ else {
+ weprintf("You have no HOME, cannot read configuration");
+ return;
+ }
+
+ oldrcpath = estrjoin("/", home, ".fehrc", NULL);
fp = fopen(rcpath, "r");