|
@@ -879,6 +879,9 @@ writeconf(char *filename, FILE * stream, int bits)
|
|
|
if (homedir() && strstr(conf.binpath, homedir())) {
|
|
if (homedir() && strstr(conf.binpath, homedir())) {
|
|
|
p = replace(conf.binpath, homedir(), "~");
|
|
p = replace(conf.binpath, homedir(), "~");
|
|
|
my_write(f, "! binpath %s\n", p);
|
|
my_write(f, "! binpath %s\n", p);
|
|
|
|
|
+ } else if (conf.homedir && strstr(conf.binpath, conf.homedir)) { /* Could be an older homedir */
|
|
|
|
|
+ p = replace(conf.binpath, conf.homedir, "~");
|
|
|
|
|
+ my_write(f, "! binpath %s\n", p);
|
|
|
} else
|
|
} else
|
|
|
my_write(f, "! binpath %s\n", conf.binpath);
|
|
my_write(f, "! binpath %s\n", conf.binpath);
|
|
|
|
|
|
|
@@ -891,6 +894,9 @@ writeconf(char *filename, FILE * stream, int bits)
|
|
|
if (homedir() && strstr(conf.datadir, homedir())) {
|
|
if (homedir() && strstr(conf.datadir, homedir())) {
|
|
|
p = replace(conf.datadir, homedir(), "~");
|
|
p = replace(conf.datadir, homedir(), "~");
|
|
|
my_write(f, "! datadir %s\n", p);
|
|
my_write(f, "! datadir %s\n", p);
|
|
|
|
|
+ } else if (conf.homedir && strstr(conf.datadir, conf.homedir)) { /* Could be an older homedir */
|
|
|
|
|
+ p = replace(conf.datadir, conf.homedir, "~");
|
|
|
|
|
+ my_write(f, "! datadir %s\n", p);
|
|
|
} else
|
|
} else
|
|
|
my_write(f, "! datadir %s\n", conf.datadir);
|
|
my_write(f, "! datadir %s\n", conf.datadir);
|
|
|
|
|
|