1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2020-05-29 11:57:33 +02:00
родитель 512b0fd32d
Коммит 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);
}