[PATCH 3 of 3] shell32: implement SHPathPrepareForWrite

Vincent Povirk madewokherd+d41d at gmail.com
Sun Sep 2 22:42:26 CDT 2007


On 9/2/07, Vincent Povirk <madewokherd+d41d at gmail.com> wrote:
> On 9/2/07, Dmitry Timoshkov <dmitry at codeweavers.com> wrote:
> > By checking return value of SHCreateDirectoryExW you can make a shortcut
> > in the deciding logic, in both cases: when the function fails you exit
> > right away (returning *correct* error to the caller and not a guessed one),
> > in the case of success GetFileAttributes call is redundant and you exit
> > right away again.
>
> After looking into this a bit more, yes, one of those calls will
> always be sufficient to do the work and determine what the result
> should be, at least in the cases I tested. Which one depends on flags
> and whether the path is relative (to my knowledge no apps actually use
> relative paths).

Well, I COULD do that if SHCreateDirectoryExW worked the way the Wine
API docs claim. It seems to be returning ERROR_ALREADY_EXISTS even
when the thing that already exists is a file and not a directory.

-- 
Vincent Povirk



More information about the wine-devel mailing list