changeset 240:163bd1fd4766

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.
author John "Elwin" Edwards
date Sat, 12 Mar 2016 14:29:07 -0500
parents 837044d2c362
children d0f652010675
files srogue/save.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/srogue/save.c	Fri Mar 11 19:47:52 2016 -0500
+++ b/srogue/save.c	Sat Mar 12 14:29:07 2016 -0500
@@ -283,7 +283,7 @@
 #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");