Reject wildcards in directory names

Hans Leidekker hans at it.vu.nl
Fri Nov 21 05:28:12 CST 2003


On Friday 21 November 2003 09:43, Rolf Kalbermatter wrote:

> I would actually agree with Alexandre here, but W2K at least behaves
> differently.
> My tests show that RemoveDirectory just as CreateDirectory rejects all
> paths which contain one of the wildcards ": * ? \" < > |" with error 123
> completely independent where that character occurs (not just in the path
> element which is created).

I extended the conformance test to check that and yes, RemoveDirectory
will fail on W2K (ntfs). To add to your observation, there is also a 
number of invalid non-readable characters, and I read somewhere that FAT 
also rejects '^'.

> And as far as I can say DeleteFile just as much behaves also this way.
> So should we attempt to be smarter than Windows in this case?

No, I don't think we should. Some (buggy) application might depend on
it. But I do think that RemoveDirectory always succeeding would have
been a better implementation.

By the way, this points in the direction of a single parameter checking
routine that get's called in all API's that take a path or filename.

 -Hans




More information about the wine-devel mailing list