add fallback to the old dunstrc path
This commit is contained in:
parent
78b6e2b19f
commit
a5f64fc938
5
dunst.c
5
dunst.c
@ -1066,11 +1066,16 @@ parse_dunstrc(void) {
|
|||||||
xdgInitHandle(&xdg);
|
xdgInitHandle(&xdg);
|
||||||
|
|
||||||
config_file = xdgConfigOpen("dunst/dunstrc", "r", &xdg);
|
config_file = xdgConfigOpen("dunst/dunstrc", "r", &xdg);
|
||||||
|
if (config_file == NULL) {
|
||||||
|
/* 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) {
|
if (config_file == NULL) {
|
||||||
puts("no dunstrc found -> skipping\n");
|
puts("no dunstrc found -> skipping\n");
|
||||||
xdgWipeHandle(&xdg);
|
xdgWipeHandle(&xdg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ini_parse_file(config_file, dunst_ini_handle, NULL) < 0) {
|
if (ini_parse_file(config_file, dunst_ini_handle, NULL) < 0) {
|
||||||
puts("dunstrc could not be parsed -> skipping\n");
|
puts("dunstrc could not be parsed -> skipping\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user