fix canned rcfile path
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@157 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
cca65f1062
commit
e218bf1055
|
@ -1131,9 +1131,9 @@ write_canned_rcfile (char *target)
|
||||||
char buf[1024], *rfn;
|
char buf[1024], *rfn;
|
||||||
size_t bytes, len;
|
size_t bytes, len;
|
||||||
|
|
||||||
len = strlen(myconfig->dglroot) + strlen(myconfig->rcfile) + 1;
|
len = strlen(myconfig->rcfile) + 2;
|
||||||
rfn = malloc(len);
|
rfn = malloc(len);
|
||||||
snprintf (rfn, len, "%s%s", myconfig->dglroot, myconfig->rcfile);
|
snprintf (rfn, len, "/%s", myconfig->rcfile);
|
||||||
|
|
||||||
if (!(newfile = fopen (target, "w")))
|
if (!(newfile = fopen (target, "w")))
|
||||||
{
|
{
|
||||||
|
@ -1179,7 +1179,6 @@ editoptions ()
|
||||||
pid_t editor;
|
pid_t editor;
|
||||||
|
|
||||||
rcfile = fopen (rcfilename, "r");
|
rcfile = fopen (rcfilename, "r");
|
||||||
printf (" read");
|
|
||||||
if (!rcfile) /* should not really happen except for old users */
|
if (!rcfile) /* should not really happen except for old users */
|
||||||
write_canned_rcfile (rcfilename);
|
write_canned_rcfile (rcfilename);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue