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.
Этот коммит содержится в:
родитель
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);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user