rogue4: don't delete the savefile if the terminal is too small.

Let the user resize the terminal and try again.
This commit is contained in:
John "Elwin" Edwards 2013-08-08 14:30:12 -07:00
parent e375c8bd05
commit 5a47554e45

View file

@ -230,15 +230,6 @@ char **envp;
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 @@ char **envp;
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 @@ char **envp;
return FALSE;
}
if (rs_restore_file(inf) == FALSE)
{
endwin();
printf("Cannot restore file\n");
return(FALSE);
}
#ifdef SIGTSTP
signal(SIGTSTP, tstp);
#endif