mirror of
https://github.com/reactos/reactos.git
synced 2026-05-11 10:44:20 +08: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user