files: before prompting, show also the reason why the backup failed
Also, do not prompt when there is no space left on the device, because then trying to save the actual file would likely lead to truncating it, resulting in an empty file.master
parent
512b0fd32d
commit
4b4a8be58b
|
@ -1479,7 +1479,13 @@ bool outside_of_confinement(const char *currpath, bool allow_tabcomp)
|
|||
* messed up and I'm blanket allowing insecure file writing operations'. */
|
||||
bool user_wants_to_proceed(void)
|
||||
{
|
||||
return (do_yesno_prompt(FALSE, _("Cannot make backup; "
|
||||
warn_and_briefly_pause(strerror(errno));
|
||||
|
||||
if (errno == ENOSPC) {
|
||||
currmenu = MMOST;
|
||||
return FALSE;
|
||||
} else
|
||||
return (do_yesno_prompt(FALSE, _("Cannot make backup; "
|
||||
"continue and save actual file? ")) == 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue