Fix incorrect path conversion on non-existent files on network shares
NtOpenFile/NtCreateFile on non-existent paths on network drives has a bug. Assuming a path Z:\dir\file. Further assuming that Z:\dir does not exist. The first NtOpenFile("Z:\dir\file") correctly returns STATUS_OBJECT_PATH_NOT_FOUND. Subsequent calls incorrectly return STATUS_OBJECT_NAME_NOT_FOUND. This appears to be some kind of caching behaviour. Waiting a while before repeating the call correctly returns STATUS_OBJECT_PATH_NOT_FOUND again. This patch works around the observed misbehaviour. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
937a2d92e2
commit
563dda8259
@ -2810,6 +2810,13 @@ restart:
|
||||
|| status == STATUS_NO_MEDIA_IN_DEVICE)
|
||||
{
|
||||
set_error (ENOENT);
|
||||
if (ext_tacked_on && !had_ext)
|
||||
{
|
||||
*ext_here = '\0';
|
||||
ext_tacked_on = false;
|
||||
ext_here = NULL;
|
||||
extn = 0;
|
||||
}
|
||||
goto file_not_symlink;
|
||||
}
|
||||
if (status != STATUS_OBJECT_NAME_NOT_FOUND
|
||||
|
Loading…
x
Reference in New Issue
Block a user