Re: [PATCH] shell32: Allow copy operation to overwrite an existing write protected file + tests
22 Feb
2010
22 Feb
'10
11:34 a.m.
Christian Costa <titan.costa(a)wanadoo.fr> writes:
@@ -627,6 +627,14 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
+ if (PathFileExistsW(dest)) + { + /* Destination file may already exist with read only attribute */ + DWORD attribs = GetFileAttributesW(dest); + if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY)) + SetFileAttributesW(dest, attribs &= ~ FILE_ATTRIBUTE_READONLY); + } +
The PathFileExistsW call is redundant. -- Alexandre Julliard julliard(a)winehq.org
5778
Age (days ago)
5778
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard