forked from pool/dialog
b980be8578
- don't install config file, dialog has built in defaults anyway - add support for /usr/etc (dialog-1.3-usretc.diff) OBS-URL: https://build.opensuse.org/request/show/1129823 OBS-URL: https://build.opensuse.org/package/show/Base:System/dialog?expand=0&rev=57
19 lines
703 B
Diff
19 lines
703 B
Diff
Index: dialog-1.3-20230209/rc.c
|
|
===================================================================
|
|
--- dialog-1.3-20230209.orig/rc.c
|
|
+++ dialog-1.3-20230209/rc.c
|
|
@@ -576,8 +576,11 @@ dlg_parse_rc(void)
|
|
if (rc_file == NULL) { /* step (b) failed? */
|
|
/* try step (c) */
|
|
strcpy(str, GLOBALRC);
|
|
- if ((rc_file = fopen(filename = str, "rt")) == NULL)
|
|
- return 0; /* step (c) failed, use default values */
|
|
+ if ((rc_file = fopen(filename = str, "rt")) == NULL) {
|
|
+ sprintf(str, "/usr/%s", GLOBALRC);
|
|
+ if ((rc_file = fopen(filename = str, "rt")) == NULL)
|
|
+ return 0; /* step (c) failed, use default values */
|
|
+ }
|
|
}
|
|
|
|
DLG_TRACE(("# opened rc file \"%s\"\n", filename));
|