To: vim_dev@googlegroups.com Subject: Patch 8.2.2450 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2450 Problem: MS-Windows: ADS was not preserved if 'backupcopy' is "yes". Solution: Copy ADS before truncating the file. (Ken Takata, closes #7762) Files: src/bufwrite.c *** ../vim-8.2.2449/src/bufwrite.c 2020-12-23 18:54:53.569837273 +0100 --- src/bufwrite.c 2021-02-01 20:32:23.478435940 +0100 *************** *** 1497,1502 **** --- 1497,1505 ---- #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) mch_copy_sec(fname, backup); #endif + #ifdef MSWIN + (void)mch_copy_file_attribute(fname, backup); + #endif break; } } *************** *** 1909,1920 **** #if defined(MSWIN) if (backup != NULL && overwriting && !append) ! { ! if (backup_copy) ! (void)mch_copy_file_attribute(wfname, backup); ! else ! (void)mch_copy_file_attribute(backup, wfname); ! } if (!overwriting && !append) { --- 1912,1918 ---- #if defined(MSWIN) if (backup != NULL && overwriting && !append) ! (void)mch_copy_file_attribute(backup, wfname); if (!overwriting && !append) { *** ../vim-8.2.2449/src/version.c 2021-02-01 20:14:44.566705066 +0100 --- src/version.c 2021-02-01 20:33:53.894115822 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2450, /**/ -- Facepalm statement #9: "Did you see, there is now even a hobbit book" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///