add fallback to the old dunstrc path

This commit is contained in:
Michael Stapelberg 2012-06-23 20:16:04 +02:00
parent 78b6e2b19f
commit a5f64fc938

11
dunst.c
View File

@ -1067,9 +1067,14 @@ parse_dunstrc(void) {
config_file = xdgConfigOpen("dunst/dunstrc", "r", &xdg); config_file = xdgConfigOpen("dunst/dunstrc", "r", &xdg);
if (config_file == NULL) { if (config_file == NULL) {
puts("no dunstrc found -> skipping\n"); /* Fall back to just "dunstrc", which was used before 2012-06-23
xdgWipeHandle(&xdg); * (before v0.2). */
return; 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) { if (ini_parse_file(config_file, dunst_ini_handle, NULL) < 0) {