[PATCH v2] kernel32: Consider the working directory first when launching executables with CreateProcess.

Erich E. Hoover erich.e.hoover at gmail.com
Sun Apr 28 13:12:41 CDT 2019


v2: Fix the logic so that having NoDefaultCurrentDirectoryInExePath
set does not break the search

*The three most relevant cases*
Case 1:
NoDefaultCurrentDirectoryInExePath = False
NeedCurrentDirectoryForExePathW = True
GetCurrentDirectoryW != 0 (True)
SearchPathW = True
Overall = True (stop search)
Case 2:
NoDefaultCurrentDirectoryInExePath = False
NeedCurrentDirectoryForExePathW = True
GetCurrentDirectoryW != 0 (True)
SearchPathW = False
Overall = False (continue search)
Case 3:
NoDefaultCurrentDirectoryInExePath = True
NeedCurrentDirectoryForExePathW = False
GetCurrentDirectoryW (not called)
SearchPathW (not called)
Overall = False (continue search)

Best,
Erich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kernel32-Consider-the-working-directory-first-when-l.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190428/277c286f/attachment.bin>


More information about the wine-devel mailing list