diff --git a/base/shell/cmd/copy.c b/base/shell/cmd/copy.c index 40bf43eda0d..73901d7cd91 100644 --- a/base/shell/cmd/copy.c +++ b/base/shell/cmd/copy.c @@ -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)