Module: wine Branch: master Commit: 193d9fcf261a40e11349ea57441ae169ff3692de URL: https://source.winehq.org/git/wine.git/?a=commit;h=193d9fcf261a40e11349ea574...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Mar 2 12:04:00 2021 +0100
ntdll: Only check the existence of the directory for the Unix pathname heuristic.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/path.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index 9d707d883b2..4cb64cbe516 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -551,7 +551,8 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size) RtlInitUnicodeString( &str, nt_str ); buflen = 3 * wcslen(name) + 1; unix_name = RtlAllocateHeap( GetProcessHeap(), 0, buflen ); - if (!(status = wine_nt_to_unix_file_name( &str, unix_name, &buflen, FILE_OPEN ))) + status = wine_nt_to_unix_file_name( &str, unix_name, &buflen, FILE_OPEN_IF ); + if (!status || status == STATUS_NO_SUCH_FILE) { buflen = wcslen(name) + 9; status = wine_unix_to_nt_file_name( unix_name, nt_str, &buflen );