Mercurial > hg > early-roguelike
diff rogue4/save.c @ 13:63b9fd7d70ce
rogue4: add -n option and system savedir
author | edwarj4 |
---|---|
date | Sat, 31 Oct 2009 01:51:52 +0000 |
parents | 9535a08ddc39 |
children | e7dc81b41168 |
line wrap: on
line diff
--- a/rogue4/save.c Sat Oct 24 16:52:52 2009 +0000 +++ b/rogue4/save.c Sat Oct 31 01:51:52 2009 +0000 @@ -197,6 +197,12 @@ if ((inf = open(file, 0)) < 0) { + if (use_savedir && errno == ENOENT) + { + /* We're using a system savefile which doesn't exist. + This isn't a fatal error, it means start a new game. */ + return TRUE; + } perror(file); return FALSE; }