Skip to content

Commit 7781ebe

Browse files
committed
patch 8.2.2450: MS-Windows: ADS was not preserved if 'backupcopy' is "yes"
Problem: MS-Windows: ADS was not preserved if 'backupcopy' is "yes". Solution: Copy ADS before truncating the file. (Ken Takata, closes #7762)
1 parent 3b69006 commit 7781ebe

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/bufwrite.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,9 @@ buf_write(
14961496
#endif
14971497
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
14981498
mch_copy_sec(fname, backup);
1499+
#endif
1500+
#ifdef MSWIN
1501+
(void)mch_copy_file_attribute(fname, backup);
14991502
#endif
15001503
break;
15011504
}
@@ -1909,12 +1912,7 @@ buf_write(
19091912

19101913
#if defined(MSWIN)
19111914
if (backup != NULL && overwriting && !append)
1912-
{
1913-
if (backup_copy)
1914-
(void)mch_copy_file_attribute(wfname, backup);
1915-
else
1916-
(void)mch_copy_file_attribute(backup, wfname);
1917-
}
1915+
(void)mch_copy_file_attribute(backup, wfname);
19181916

19191917
if (!overwriting && !append)
19201918
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2450,
753755
/**/
754756
2449,
755757
/**/

0 commit comments

Comments
 (0)