diff src/fileio.c @ 24:8ff7fd162d3c v7.0016

updated for version 7.0016
author vimboss
date Mon, 13 Sep 2004 20:26:32 +0000
parents 3f44e9abe4ec
children 404aac550f35
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3832,8 +3832,10 @@ restore_backup:
 #ifdef FEAT_MBYTE
     /*
      * The BOM is written just after the encryption magic number.
+     * Skip it when appending and the file already existed, the BOM only makes
+     * sense at the start of the file.
      */
-    if (buf->b_p_bomb && !write_bin)
+    if (buf->b_p_bomb && !write_bin && (!append || perm < 0))
     {
 	write_info.bw_len = make_bom(buffer, fenc);
 	if (write_info.bw_len > 0)