[ros-diffs] [cwittich] 46223: [SHELL32] sync SHNotifyCopyFileW to wine 1.1.40
cwittich at svn.reactos.org
cwittich at svn.reactos.org
Tue Mar 16 13:02:45 CET 2010
Author: cwittich
Date: Tue Mar 16 13:02:45 2010
New Revision: 46223
URL: http://svn.reactos.org/svn/reactos?rev=46223&view=rev
Log:
[SHELL32]
sync SHNotifyCopyFileW to wine 1.1.40
Modified:
trunk/reactos/dll/win32/shell32/shlfileop.c
Modified: trunk/reactos/dll/win32/shell32/shlfileop.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfileop.c?rev=46223&r1=46222&r2=46223&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlfileop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlfileop.c [iso-8859-1] Tue Mar 16 13:02:45 2010
@@ -531,8 +531,14 @@
static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
{
BOOL ret;
+ DWORD attribs;
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
+
+ /* Destination file may already exist with read only attribute */
+ attribs = GetFileAttributesW(dest);
+ if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY))
+ SetFileAttributesW(dest, attribs & ~FILE_ATTRIBUTE_READONLY);
ret = CopyFileW(src, dest, bFailIfExists);
if (ret)
@@ -1479,7 +1485,7 @@
/*************************************************************************
* SHFreeNameMappings [shell32.246]
*
- * Free the mapping handle returned by SHFileoperation if FOF_WANTSMAPPINGHANDLE
+ * Free the mapping handle returned by SHFileOperation if FOF_WANTSMAPPINGHANDLE
* was specified.
*
* PARAMS
@@ -1496,12 +1502,12 @@
for (; i>= 0; i--)
{
- LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i);
+ LPSHNAMEMAPPINGW lp = DSA_GetItemPtr(hNameMapping, i);
SHFree(lp->pszOldPath);
SHFree(lp->pszNewPath);
}
- DSA_Destroy((HDSA)hNameMapping);
+ DSA_Destroy(hNameMapping);
}
}
More information about the Ros-diffs
mailing list