tweaks: adjust the indentation after the previous change, and another

master
Benno Schulenberg 2019-10-17 11:31:34 +02:00
parent 4e40ec057e
commit e915fb1650
1 changed files with 14 additions and 15 deletions

View File

@ -1570,17 +1570,16 @@ bool write_file(const char *name, FILE *stream, bool tmp,
filetime[0].tv_sec = openfile->current_stat->st_atime; filetime[0].tv_sec = openfile->current_stat->st_atime;
filetime[1].tv_sec = openfile->current_stat->st_mtime; filetime[1].tv_sec = openfile->current_stat->st_mtime;
/* Open the original file to copy to the backup. */ /* Open the file of which a backup must be made. */
f = fopen(realname, "rb"); f = fopen(realname, "rb");
if (f == NULL) { if (f == NULL) {
statusline(ALERT, _("Error reading %s: %s"), realname, statusline(ALERT, _("Error reading %s: %s"), realname,
strerror(errno)); strerror(errno));
/* If we can't read from the original file, go on, since /* If we can't read from the original file, go on, since saving
* only saving the current buffer is better than saving * only the current buffer is better than saving nothing. */
* nothing. */ goto skip_backup;
goto skip_backup; }
}
/* If backup_dir is set, we set backupname to /* If backup_dir is set, we set backupname to
* backup_dir/backupname~[.number], where backupname is the * backup_dir/backupname~[.number], where backupname is the
@ -1874,11 +1873,11 @@ bool write_file(const char *name, FILE *stream, bool tmp,
unlink(tempname); unlink(tempname);
} else } else
#endif #endif
if (fclose(f) != 0) { if (fclose(f) != 0) {
statusline(ALERT, _("Error writing %s: %s"), realname, statusline(ALERT, _("Error writing %s: %s"), realname,
strerror(errno)); strerror(errno));
goto cleanup_and_exit; goto cleanup_and_exit;
} }
/* When having written an entire buffer, update some administrivia. */ /* When having written an entire buffer, update some administrivia. */
if (fullbuffer && method == OVERWRITE && !tmp) { if (fullbuffer && method == OVERWRITE && !tmp) {