http://bugs.winehq.org/show_bug.cgi?id=21086
--- Comment #6 from Jason Edmeades us@edmeades.me.uk 2009-12-20 15:15:28 --- Yes, sorry... exactly...! On wine the SearchPath with no filename succeeds and the app in question then tries to fopen the file, which fails as its trying to open a directory!
Pasted here is a patch which solves the problem for my app and I think its the simplest solution. (I would attach it as a patch but its cut and pasted from a document I was maintaining for the app in question). Can you see if it makes the test pass please (feel free to submit it, otherwise I'll try to send it in when I get back to work and can get a proper patch file).
--- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -753,6 +753,11 @@ DWORD WINAPI SearchPathW( LPCWSTR path, LPCWSTR name, LPCWSTR ext, DWORD buflen, DWORD ret = 0;
/* If the name contains an explicit path, ignore the path */ + if (name && name[0] == 0x00) { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + }