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:
parent
e375c8bd05
commit
5a47554e45
1 changed files with 17 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue