Commit 0abf2251 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

files: check also for write errors when prepending, not just read errors

No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -1979,7 +1979,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp,
goto cleanup_and_exit;
}
if (copy_file(f_source, f, TRUE) == -1) {
if (copy_file(f_source, f, TRUE) != 0) {
statusline(ALERT, _("Error writing %s: %s"), realname,
strerror(errno));
goto cleanup_and_exit;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment