diff srogue/save.c @ 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 94a0d9dd5ce1
children 3d4252fa2ed3
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");