diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index afb552be098..d12a3ffb119 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -2550,6 +2550,8 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i goto not_found; } } + /* if that did not work, restore previous state of unix_name */ + unix_name[pos - 1] = 0; } close( fd ); }