From 5cc2c324e269756464275741c35033d972cc645a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 15 Jan 2011 11:50:47 +0100 Subject: BC for ~/.fehrc --- src/options.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/options.c b/src/options.c index f0e09b5..b4c18ea 100644 --- a/src/options.c +++ b/src/options.c @@ -148,6 +148,7 @@ static void feh_load_options_for_theme(char *theme) FILE *fp = NULL; char *home = getenv("HOME"); char *rcpath = NULL; + char *oldrcpath = NULL; char *confbase = getenv("XDG_CONFIG_HOME"); char s[1024], s1[1024], s2[1024]; int cont = 0; @@ -156,6 +157,8 @@ static void feh_load_options_for_theme(char *theme) if (!home) eprintf("You have no HOME, cannot read themes"); + oldrcpath = estrjoin("/", home, ".fehrc", NULL); + if (confbase) rcpath = estrjoin("/", confbase, "feh/themes", NULL); else @@ -165,6 +168,12 @@ static void feh_load_options_for_theme(char *theme) free(rcpath); + if (!fp && ((fp = fopen(oldrcpath, "r")) != NULL)) + weprintf("the config is now read from .config/feh/themes, " + "please update your path!"); + + free(oldrcpath); + if (!fp && ((fp = fopen("/etc/feh/themes", "r")) == NULL)) return; -- cgit v1.2.3