# HG changeset patch # User John "Elwin" Edwards # Date 1375997412 25200 # Node ID a0d4caead33b988f69c6af4d0ef50b60ae1c6bfd # Parent 09db0cf536af48380aeb3dbf506c642b6380fba0 rogue4: don't delete the savefile if the terminal is too small. Let the user resize the terminal and try again. diff -r 09db0cf536af -r a0d4caead33b rogue4/save.c --- a/rogue4/save.c Thu Aug 08 12:41:35 2013 -0700 +++ b/rogue4/save.c Thu Aug 08 14:30:12 2013 -0700 @@ -230,15 +230,6 @@ fstat(inf, &sbuf2); fflush(stdout); syml = issymlink(file); - if ( -#ifdef WIZARD - !wizard && -#endif - md_unlink(file) < 0) - { - printf("Cannot unlink file\n"); - return FALSE; - } fflush(stdout); @@ -272,6 +263,23 @@ mpos = 0; mvprintw(0, 0, "%s: %s", file, ctime(&sbuf2.st_mtime)); + if (rs_restore_file(inf) == FALSE) + { + endwin(); + printf("Cannot restore file\n"); + return(FALSE); + } + + if ( +#ifdef WIZARD + !wizard && +#endif + md_unlink(file) < 0) + { + printf("Cannot unlink file\n"); + return FALSE; + } + /* * defeat multiple restarting from the same place */ @@ -284,13 +292,6 @@ return FALSE; } - if (rs_restore_file(inf) == FALSE) - { - endwin(); - printf("Cannot restore file\n"); - return(FALSE); - } - #ifdef SIGTSTP signal(SIGTSTP, tstp); #endif