Update to version 2.8 OBS-URL: https://build.opensuse.org/request/show/978725 OBS-URL: https://build.opensuse.org/package/show/Base:System/minicom?expand=0&rev=51
22 lines
821 B
Diff
22 lines
821 B
Diff
diff -Nur minicom-2.8/src/config.c new/src/config.c
|
|
--- minicom-2.8/src/config.c 2021-01-01 18:45:55.000000000 +0100
|
|
+++ new/src/config.c 2022-05-23 15:22:59.218799729 +0200
|
|
@@ -1372,7 +1372,7 @@
|
|
int dodflsave(void)
|
|
{
|
|
FILE *fp;
|
|
- char *fname = dosetup ? parfile : pparfile;
|
|
+ char *fname = getuid() == 0 ? parfile : pparfile;
|
|
|
|
if ((fp = fopen(fname, "w")) == NULL) {
|
|
werror(_("Cannot write to %s"), fname);
|
|
@@ -1427,7 +1427,7 @@
|
|
s = input(_("Give name to save this configuration?"), ifile, sizeof(ifile));
|
|
if (s != (char *)0 && *s != 0) {
|
|
if (dosetup) {
|
|
- snprintf(parfile, sizeof(parfile), "%s/minirc.%s", CONFDIR, s);
|
|
+ snprintf(pparfile, sizeof(pparfile), "%s/.minirc.%s", homedir, s);
|
|
} else {
|
|
snprintf(pparfile, sizeof(pparfile), "%s/.minirc.%s", homedir, s);
|
|
}
|