Add -n option and system savedir functionality
This commit is contained in:
parent
4662bbf65b
commit
265ac56d38
5 changed files with 65 additions and 22 deletions
|
|
@ -143,8 +143,17 @@ restore(char *file, char **envp)
|
|||
|
||||
if ((inf = fopen(file, "r")) == NULL)
|
||||
{
|
||||
perror(file);
|
||||
return FALSE;
|
||||
if (use_savedir && errno == ENOENT)
|
||||
{
|
||||
/* We're using the system savefile and it doesn't exist.
|
||||
* This isn't a fatal error, we'll just start a new game. */
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
perror(file);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue