Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
fef675e7
Commit
fef675e7
authored
Jun 28, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix returned status code for non-directory in path.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a00dfe4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
file.c
dlls/ntdll/tests/file.c
+0
-2
path.c
dlls/ntdll/tests/path.c
+4
-4
file.c
dlls/ntdll/unix/file.c
+3
-3
No files found.
dlls/ntdll/tests/file.c
View file @
fef675e7
...
...
@@ -417,11 +417,9 @@ static void open_file_test(void)
pRtlDosPathNameToNtPathName_U
(
path
,
&
nameW
,
NULL
,
NULL
);
status
=
pNtOpenFile
(
&
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_DIRECTORY_FILE
);
todo_wine
ok
(
status
==
STATUS_OBJECT_PATH_NOT_FOUND
,
"open %s failed %lx
\n
"
,
wine_dbgstr_w
(
nameW
.
Buffer
),
status
);
status
=
pNtOpenFile
(
&
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_NON_DIRECTORY_FILE
);
todo_wine
ok
(
status
==
STATUS_OBJECT_PATH_NOT_FOUND
,
"open %s failed %lx
\n
"
,
wine_dbgstr_w
(
nameW
.
Buffer
),
status
);
pRtlFreeUnicodeString
(
&
nameW
);
...
...
dlls/ntdll/tests/path.c
View file @
fef675e7
...
...
@@ -653,9 +653,9 @@ static void test_nt_names(void)
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\\\
"
,
STATUS_OBJECT_NAME_INVALID
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
foobar
\\
"
,
STATUS_OBJECT_NAME_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
Kernel32.Dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
sys
\001
"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
"
,
NULL
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
"
,
NULL
,
STATUS_SUCCESS
},
...
...
@@ -679,9 +679,9 @@ static void test_nt_names(void)
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\\\
"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
foobar
\\
"
,
STATUS_OBJECT_NAME_NOT_FOUND
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
Kernel32.Dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"
\\
system32
\\
kernel32.dll"
,
STATUS_INVALID_PARAMETER
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"/system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L".
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
,
STATUS_OBJECT_PATH_NOT_FOUND
},
...
...
dlls/ntdll/unix/file.c
View file @
fef675e7
...
...
@@ -2594,7 +2594,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
not_found:
unix_name
[
pos
-
1
]
=
0
;
return
STATUS_OBJECT_
PATH
_NOT_FOUND
;
return
STATUS_OBJECT_
NAME
_NOT_FOUND
;
}
...
...
@@ -3200,9 +3200,8 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
/* if this is the last element, not finding it is not necessarily fatal */
if
(
!
name_len
)
{
if
(
status
==
STATUS_OBJECT_
PATH
_NOT_FOUND
)
if
(
status
==
STATUS_OBJECT_
NAME
_NOT_FOUND
)
{
status
=
STATUS_OBJECT_NAME_NOT_FOUND
;
if
(
disposition
!=
FILE_OPEN
&&
disposition
!=
FILE_OVERWRITE
)
{
ret
=
ntdll_wcstoumbs
(
name
,
end
-
name
,
unix_name
+
pos
+
1
,
MAX_DIR_ENTRY_LEN
+
1
,
TRUE
);
...
...
@@ -3220,6 +3219,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
status
=
STATUS_OBJECT_NAME_COLLISION
;
}
}
else
if
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
)
status
=
STATUS_OBJECT_PATH_NOT_FOUND
;
if
(
status
!=
STATUS_SUCCESS
)
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment