On 9/2/07, Vincent Povirk <[EMAIL PROTECTED]> wrote:
> On 9/2/07, Dmitry Timoshkov <[EMAIL PROTECTED]> 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


Reply via email to