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
d1f83537
Commit
d1f83537
authored
Jul 16, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use FSCTL_GET_OBJECT_ID to compare file identities.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
14994715
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
file.c
dlls/kernelbase/file.c
+4
-4
No files found.
dlls/kernelbase/file.c
View file @
d1f83537
...
...
@@ -473,12 +473,12 @@ DWORD file_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen )
*/
static
BOOL
is_same_file
(
HANDLE
h1
,
HANDLE
h2
)
{
FILE_
ID_INFORMATION
id1
,
id2
;
FILE_
OBJECTID_BUFFER
id1
,
id2
;
IO_STATUS_BLOCK
io
;
return
!
NtQueryInformationFile
(
h1
,
&
io
,
&
id1
,
sizeof
(
id1
),
FileIdInformation
)
&&
!
NtQueryInformationFile
(
h2
,
&
io
,
&
id2
,
sizeof
(
id2
),
FileIdInformation
)
&&
!
memcmp
(
&
id1
,
&
id2
,
sizeof
(
FILE_ID_INFORMATION
)
);
return
(
!
NtFsControlFile
(
h1
,
0
,
NULL
,
NULL
,
&
io
,
FSCTL_GET_OBJECT_ID
,
NULL
,
0
,
&
id1
,
sizeof
(
id1
)
)
&&
!
NtFsControlFile
(
h2
,
0
,
NULL
,
NULL
,
&
io
,
FSCTL_GET_OBJECT_ID
,
NULL
,
0
,
&
id2
,
sizeof
(
id2
)
)
&&
!
memcmp
(
&
id1
.
ObjectId
,
&
id2
.
ObjectId
,
sizeof
(
id1
.
ObjectId
)
)
);
}
...
...
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