Hi all,
Here is patch for the SHFileOperationW problem. (Which I originally sent out in January. )
It isn't perfect, and it fixes the problem for my application. (which happens to be the same as Lionel's)
According to Lionel the fix is better than what is there today, but it falls short of windows behavior in the following manner (for the record):
But it's not 100 % correct as, for example, it does not work if one needs to create more than one level of directories (which is working fine in Windows, I just checked it). Moreover, there should be a message box (if not disabled like in RollerCoasterTycoon) asking if the users wants or not to create the directory (I checked this on Windows too).
--Phil
Hewlett-Packard: High Performance Technical Computing/Visualization --------------------------------------------------------------------------- Phillip.Ezolt@hp.com Performance/Development
---------- Forwarded message ---------- Date: Fri, 30 Jan 2004 12:54:48 -0500 (EST) From: Phillip Ezolt phillip.ezolt@hp.com To: wine-patches@winehq.org Subject: SHFileOperationW: Create subdir on Copy
Hi All,
Here's a small fix. Comments/questions are welcomed.
Summary ------- This patch allows SHFileOperationW to automatically create subdirectories if they don't exists. (The Microsoft documentation states that this is correct.)
This patch fixes bug #1954. I have verified that it works with Today's CVS. (January 30,2004)
I ran into this problem with the Rollercoaster Tycoon demo installer.
It can successfully copy files to this newly created directory, but coping into any (currently non-existant) directories below it fail.
According to MS: (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla...)
" Copy and Move operations can specify destination directories that do not exist and the system will attempt to create them. " (See footnote #1 for more info)
For example, this succeeds: trace:shell:SHNotifyCopyFileW (L"E:\WZS21db.tmp\English\rct.exe" L"C:\Program Files\Hasbro Interactive\RollerCoaster Tycoon Demo\rct.exe" )
But this fails: trace:shell:SHNotifyCopyFileW (L"E:\WZS21db.tmp\Saved Games\001" L"C:\Program Files\Hasbro Interactive\RollerCoaster Tycoon Demo\Saved Games\001" )
The directory "Saved Games" should be created before "001" is copied into it. Instead, the call fails.
--Phil
Hewlett-Packard: High Performance Technical Computing/Visualization --------------------------------------------------------------------------- Phillip.Ezolt@hp.com Performance/Development