files: don't mention the name of the temp file when reading goes wrong

When writing a temp file goes wrong, its name is not mentioned either.
master
Benno Schulenberg 2019-10-18 13:38:20 +02:00
parent 042b8394a0
commit 1082f2adec
1 changed files with 2 additions and 2 deletions

View File

@ -1855,7 +1855,7 @@ bool write_file(const char *name, FILE *stream, bool tmp,
int verdict;
if (source == NULL) {
statusline(ALERT, _("Error reading %s: %s"), tempname,
statusline(ALERT, _("Error reading temp file: %s"),
strerror(errno));
fclose(thefile);
goto cleanup_and_exit;
@ -1864,7 +1864,7 @@ bool write_file(const char *name, FILE *stream, bool tmp,
verdict = copy_file(source, thefile, TRUE);
if (verdict < 0) {
statusline(ALERT, _("Error reading %s: %s"), tempname,
statusline(ALERT, _("Error reading temp file: %s"),
strerror(errno));
goto cleanup_and_exit;
} else if (verdict > 0) {