Re: GetTempFileName should return 0 when the path isn't valid
On Sun, Mar 29, 2009 at 11:37 AM, Oskar Eisemuth <patchnow(a)gmail.com> wrote:
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? -- -Austin
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
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.
Hello The patch "kernel32: GetTempFileName should return 0 when the path isn't valid, including test" has the necessary tests, anything I missed? -- Oskar
participants (3)
-
Austin English -
Oskar Eisemuth -
Paul Vriens