don't always call write_canned_rcfile()

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@245 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-02-17 18:33:13 +00:00
parent 8da5f29475
commit 8bfdcb26fe
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,8 @@
if it is present, so beware.
* Fixed some eerie race conditions that prevented writefile() from
writing a full file all the time. (jilles)
* Don't write rcfiles if they already exist. (i.e., lost account
holders recreating their accounts.
1.4.1 (2004/02/13)
* Don't explicitly unlock the lock file before fclosing it;

View File

@ -1052,7 +1052,9 @@ newuser ()
loggedin = 1;
snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username);
write_canned_rcfile (rcfilename);
if (access (rcfilename, R_OK) == -1)
write_canned_rcfile (rcfilename);
/* create their ttyrec dir */
snprintf (dirname, 100, "%sttyrec/%s", myconfig->dglroot, me->username);