diff --git a/src/files.c b/src/files.c index fdef799b..191218d6 100644 --- a/src/files.c +++ b/src/files.c @@ -1724,7 +1724,6 @@ bool write_file(const char *name, FILE *stream, bool tmp, int fd_source; FILE *f_source = NULL; - if (f == NULL) { f = fopen(realname, "rb"); if (f == NULL) { @@ -1732,7 +1731,6 @@ bool write_file(const char *name, FILE *stream, bool tmp, strerror(errno)); goto cleanup_and_exit; } - } tempname = safe_tempfile(&f); @@ -1742,7 +1740,6 @@ bool write_file(const char *name, FILE *stream, bool tmp, goto cleanup_and_exit; } - if (stream == NULL) { fd_source = open(realname, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR); if (fd_source != -1) { @@ -1756,7 +1753,6 @@ bool write_file(const char *name, FILE *stream, bool tmp, goto cleanup_and_exit; } } - } if (f_source == NULL || copy_file(f_source, f, TRUE) != 0) { statusline(ALERT, _("Error writing temp file: %s"),