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
4b2f8c80
Commit
4b2f8c80
authored
Apr 08, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Reimplement is_same_file() using FileIdInformation.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54417bf8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
path.c
dlls/kernel32/path.c
+6
-15
No files found.
dlls/kernel32/path.c
View file @
4b2f8c80
...
...
@@ -257,21 +257,12 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath, DWORD shortlen
static
BOOL
is_same_file
(
HANDLE
h1
,
HANDLE
h2
)
{
int
fd1
;
BOOL
ret
=
FALSE
;
if
(
wine_server_handle_to_fd
(
h1
,
0
,
&
fd1
,
NULL
)
==
STATUS_SUCCESS
)
{
int
fd2
;
if
(
wine_server_handle_to_fd
(
h2
,
0
,
&
fd2
,
NULL
)
==
STATUS_SUCCESS
)
{
struct
stat
stat1
,
stat2
;
if
(
fstat
(
fd1
,
&
stat1
)
==
0
&&
fstat
(
fd2
,
&
stat2
)
==
0
)
ret
=
(
stat1
.
st_dev
==
stat2
.
st_dev
&&
stat1
.
st_ino
==
stat2
.
st_ino
);
wine_server_release_fd
(
h2
,
fd2
);
}
wine_server_release_fd
(
h1
,
fd1
);
}
return
ret
;
FILE_ID_INFORMATION
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
)
);
}
/**************************************************************************
...
...
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