GetTempFileName should return 0 when the path isn't valid
Paul Vriens
paul.vriens.wine at gmail.com
Mon Mar 30 02:36:33 CDT 2009
Oskar Eisemuth wrote:
> Hello
>
>>> GetTempFileName should check the path and should return zero if it isn't a directory.
>>> See Bug 17875
>>>
>>> ---
>>> dlls/kernel32/path.c | 10 ++++++++++
>>> 1 files changed, 10 insertions(+), 0 deletions(-)
>> Can you add a testcase for this?
>
> That would need something like an non existent subpath or path?
>
> I guess it would be something like a copy of NONDIR_SHORT.
>
> sprintf(tmpstr,"%s%s",tmppath, NONDIR_SHORT);
> ok((id=GetTempFileNameA(tempstr,"path",0,newdir)),"GetTempFileNameA failed\n");
>
> --
> Oskar
>
>
>
Your patch tests 2 things, so the tests have to as well:
1. Non existing directory
2. Path is not a directory
In both cases you set the return value and the last error, so the tests again
have to check for both.
--
Cheers,
Paul.
More information about the wine-devel
mailing list