Super-Rogue: fix saving and restoring on Windows.

The problem turned out to be that the save file wasn't being deleted
because it was still open.
This commit is contained in:
John "Elwin" Edwards 2016-03-12 14:29:07 -05:00
parent 8df0a6308d
commit 84db7dbc2a

View file

@ -283,7 +283,7 @@ restore(char *file, char **envp)
#endif
if (!wizard)
{
if (md_unlink(file) < 0)
if (md_unlink_open_file(file, md_fdopen(inf, "r")) < 0)
{
endwin();
printf("Cannot unlink file\n");