From a5f64fc938d5dac16fe179c722af994e6103a107 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 23 Jun 2012 20:16:04 +0200 Subject: [PATCH] add fallback to the old dunstrc path --- dunst.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dunst.c b/dunst.c index ad1db2a..afc70fa 100644 --- a/dunst.c +++ b/dunst.c @@ -1067,9 +1067,14 @@ parse_dunstrc(void) { config_file = xdgConfigOpen("dunst/dunstrc", "r", &xdg); if (config_file == NULL) { - puts("no dunstrc found -> skipping\n"); - xdgWipeHandle(&xdg); - return; + /* Fall back to just "dunstrc", which was used before 2012-06-23 + * (before v0.2). */ + config_file = xdgConfigOpen("dunstrc", "r", &xdg); + if (config_file == NULL) { + puts("no dunstrc found -> skipping\n"); + xdgWipeHandle(&xdg); + return; + } } if (ini_parse_file(config_file, dunst_ini_handle, NULL) < 0) {