fix canned rcfile path

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@157 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-01-23 18:33:35 +00:00
parent cca65f1062
commit e218bf1055
1 changed files with 2 additions and 3 deletions

View File

@ -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);