mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
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)
This commit is contained in:
@@ -1496,6 +1496,9 @@ buf_write(
|
|||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
|
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
|
||||||
mch_copy_sec(fname, backup);
|
mch_copy_sec(fname, backup);
|
||||||
|
#endif
|
||||||
|
#ifdef MSWIN
|
||||||
|
(void)mch_copy_file_attribute(fname, backup);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1909,12 +1912,7 @@ restore_backup:
|
|||||||
|
|
||||||
#if defined(MSWIN)
|
#if defined(MSWIN)
|
||||||
if (backup != NULL && overwriting && !append)
|
if (backup != NULL && overwriting && !append)
|
||||||
{
|
|
||||||
if (backup_copy)
|
|
||||||
(void)mch_copy_file_attribute(wfname, backup);
|
|
||||||
else
|
|
||||||
(void)mch_copy_file_attribute(backup, wfname);
|
(void)mch_copy_file_attribute(backup, wfname);
|
||||||
}
|
|
||||||
|
|
||||||
if (!overwriting && !append)
|
if (!overwriting && !append)
|
||||||
{
|
{
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2450,
|
||||||
/**/
|
/**/
|
||||||
2449,
|
2449,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user