Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
wine
wine-winehq
Commits
02f80187
Commit
02f80187
authored
Apr 29, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Properly check the NtQueryDirectoryFile return status.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9fef5dc8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
file.c
dlls/kernel32/file.c
+9
-9
No files found.
dlls/kernel32/file.c
View file @
02f80187
...
...
@@ -2077,7 +2077,6 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level,
}
else
{
IO_STATUS_BLOCK
io
;
BOOL
has_wildcard
=
strpbrkW
(
info
->
mask
.
Buffer
,
wildcardsW
)
!=
NULL
;
info
->
data_size
=
has_wildcard
?
8192
:
max_entry_size
*
2
;
...
...
@@ -2091,12 +2090,12 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level,
return
INVALID_HANDLE_VALUE
;
}
NtQueryDirectoryFile
(
info
->
handle
,
0
,
NULL
,
NULL
,
&
io
,
info
->
data
,
info
->
data_size
,
status
=
NtQueryDirectoryFile
(
info
->
handle
,
0
,
NULL
,
NULL
,
&
io
,
info
->
data
,
info
->
data_size
,
FileBothDirectoryInformation
,
FALSE
,
&
info
->
mask
,
TRUE
);
if
(
io
.
u
.
S
tatus
)
if
(
s
tatus
)
{
FindClose
(
info
);
SetLastError
(
RtlNtStatusToDosError
(
io
.
u
.
S
tatus
)
);
SetLastError
(
RtlNtStatusToDosError
(
s
tatus
)
);
return
INVALID_HANDLE_VALUE
;
}
...
...
@@ -2148,6 +2147,7 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
FIND_FIRST_INFO
*
info
;
FILE_BOTH_DIR_INFORMATION
*
dir_info
;
BOOL
ret
=
FALSE
;
NTSTATUS
status
;
TRACE
(
"%p %p
\n
"
,
handle
,
data
);
...
...
@@ -2173,15 +2173,15 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
IO_STATUS_BLOCK
io
;
if
(
info
->
data_size
)
NtQueryDirectoryFile
(
info
->
handle
,
0
,
NULL
,
NULL
,
&
io
,
info
->
data
,
info
->
data_size
,
status
=
NtQueryDirectoryFile
(
info
->
handle
,
0
,
NULL
,
NULL
,
&
io
,
info
->
data
,
info
->
data_size
,
FileBothDirectoryInformation
,
FALSE
,
&
info
->
mask
,
FALSE
);
else
io
.
u
.
S
tatus
=
STATUS_NO_MORE_FILES
;
s
tatus
=
STATUS_NO_MORE_FILES
;
if
(
io
.
u
.
S
tatus
)
if
(
s
tatus
)
{
SetLastError
(
RtlNtStatusToDosError
(
io
.
u
.
S
tatus
)
);
if
(
io
.
u
.
S
tatus
==
STATUS_NO_MORE_FILES
)
SetLastError
(
RtlNtStatusToDosError
(
s
tatus
)
);
if
(
s
tatus
==
STATUS_NO_MORE_FILES
)
{
CloseHandle
(
info
->
handle
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
data
);
...
...
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