From 69f6e6796b40399a6f31b9a0d124703b2c21ba73 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 10 Nov 1995 06:44:54 +0000 Subject: [PATCH] (Fwrite_region): Move the code that writes annotations for empty files. --- src/fileio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index f6f99e5e305..47b987ad784 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3427,13 +3427,12 @@ to the file, instead of any buffer contents, and END is ignored.") nwritten += XINT (end) - tem; save_errno = errno; } - - if (nwritten == 0) - { - /* If file was empty, still need to write the annotations */ - failure = 0 > a_write (desc, "", 0, XINT (start), &annotations); - save_errno = errno; - } + } + else + { + /* If file was empty, still need to write the annotations */ + failure = 0 > a_write (desc, "", 0, XINT (start), &annotations); + save_errno = errno; } immediate_quit = 0; -- 2.39.2