comparison 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
comparison
equal deleted inserted replaced
239:837044d2c362 240:163bd1fd4766
281 #if defined(__CYGWIN__) || defined(__DJGPP__) 281 #if defined(__CYGWIN__) || defined(__DJGPP__)
282 close(inf); 282 close(inf);
283 #endif 283 #endif
284 if (!wizard) 284 if (!wizard)
285 { 285 {
286 if (md_unlink(file) < 0) 286 if (md_unlink_open_file(file, md_fdopen(inf, "r")) < 0)
287 { 287 {
288 endwin(); 288 endwin();
289 printf("Cannot unlink file\n"); 289 printf("Cannot unlink file\n");
290 return FALSE; 290 return FALSE;
291 } 291 }