mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CMD] COPY: Always remove the read-only attribute, for MS-DOS backwards-compatibility.
Tested and compared with MS CMD.EXE when copying files within the same directory, across directories and across drives. This is not done for the MOVE, REN and REPLACE commands however. CORE-18090
This commit is contained in:
parent
66d50537f4
commit
67ac583b5b
1 changed files with 2 additions and 1 deletions
|
@ -258,7 +258,8 @@ copy(TCHAR source[MAX_PATH],
|
|||
CloseHandle (hFileSrc);
|
||||
|
||||
TRACE ("setting mode\n");
|
||||
SetFileAttributes (dest, dwAttrib);
|
||||
/* For MS-DOS backwards-compatibility, always remove the read-only attribute */
|
||||
SetFileAttributes (dest, dwAttribs & ~FILE_ATTRIBUTE_READONLY);
|
||||
|
||||
/* Now finish off the copy if needed with CopyFileEx */
|
||||
if (lpdwFlags & COPY_RESTART)
|
||||
|
|
Loading…
Reference in a new issue