Re; cleanup shlfileop.c: why does this fail?
Juan Lang
juan_lang at yahoo.com
Tue Jan 18 11:27:32 CST 2005
Hi Joris,
pFromFile and pToFile are treated oddly. Pass them as WCHAR pointers to
file_operation_on_data, not as pointers to WCHAR pointers. The
implementation of file_operation_on_data does not behave the same way as
the code it replaced.
You want something like:
+static int file_operation_on_data(WIN32_FIND_DATAW *wfd,SHFILEOPSTRUCTW
*nFileOp, LPWSTR pFromFile,LPWSTR pToFile)
+{
+ LPWSTR lpFileName = wfd->cAlternateFileName;
+ if (!lpFileName[0])
+ lpFileName = wfd->cFileName;
+ if (IsDotDir(lpFileName) ||
+ (IsAttribDir(wfd->dwFileAttributes) && (nFileOp->fFlags &
FOF_FILESONLY)))
+ {
+ return 0; /* next name in pTempFrom(dir) */
+ }
+ SHFileStrCpyCatW(&pToFile[1], lpFileName, NULL);
+ SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL);
+ return SHFileOperationW (nFileOp);
+}
One other difference that jumps out at me:
- lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
+ /*lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;*/
Why this change?
--Juan
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
More information about the wine-devel
mailing list