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
a1d0e21b
Commit
a1d0e21b
authored
Mar 18, 2024
by
Yuxuan Shui
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: PathResolve should remove trailing dot.
parent
f59947bc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
shellpath.c
dlls/shell32/shellpath.c
+16
-4
shellpath.c
dlls/shell32/tests/shellpath.c
+1
-0
No files found.
dlls/shell32/shellpath.c
View file @
a1d0e21b
...
...
@@ -694,10 +694,16 @@ static BOOL PathResolveA(char *path, const char **dirs, DWORD flags)
if
(
flags
&
PRF_VERIFYEXISTS
)
{
if
(
PathFindOnPathExA
(
path
,
dirs
,
dwWhich
))
{
if
(
!
PathIsFileSpecA
(
path
))
GetFullPathNameA
(
path
,
MAX_PATH
,
path
,
NULL
);
return
TRUE
;
if
(
!
is_file_spec
&&
PathFileExistsDefExtA
(
path
,
dwWhich
))
}
if
(
!
is_file_spec
)
{
GetFullPathNameA
(
path
,
MAX_PATH
,
path
,
NULL
);
if
(
PathFileExistsDefExtA
(
path
,
dwWhich
))
return
TRUE
;
if
(
!
is_file_spec
)
GetFullPathNameA
(
path
,
MAX_PATH
,
path
,
NULL
);
}
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
...
...
@@ -723,10 +729,16 @@ static BOOL PathResolveW(WCHAR *path, const WCHAR **dirs, DWORD flags)
if
(
flags
&
PRF_VERIFYEXISTS
)
{
if
(
PathFindOnPathExW
(
path
,
dirs
,
dwWhich
))
{
if
(
!
PathIsFileSpecW
(
path
))
GetFullPathNameW
(
path
,
MAX_PATH
,
path
,
NULL
);
return
TRUE
;
if
(
!
is_file_spec
&&
PathFileExistsDefExtW
(
path
,
dwWhich
))
}
if
(
!
is_file_spec
)
{
GetFullPathNameW
(
path
,
MAX_PATH
,
path
,
NULL
);
if
(
PathFileExistsDefExtW
(
path
,
dwWhich
))
return
TRUE
;
if
(
!
is_file_spec
)
GetFullPathNameW
(
path
,
MAX_PATH
,
path
,
NULL
);
}
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
...
...
dlls/shell32/tests/shellpath.c
View file @
a1d0e21b
...
...
@@ -2963,6 +2963,7 @@ static void test_PathResolve(void)
/* PRF_VERIFYEXISTS */
{
L"shellpath"
,
PRF_VERIFYEXISTS
,
TRUE
,
testfile_lnk
},
{
L"shellpath.lnk"
,
PRF_VERIFYEXISTS
,
TRUE
,
testfile_lnk
},
{
L"shellpath.lnk."
,
PRF_VERIFYEXISTS
,
TRUE
,
testfile_lnk
},
{
L"C:
\\
shellpath"
,
PRF_VERIFYEXISTS
,
FALSE
,
L"C:
\\
shellpath"
},
/* common extensions are tried even if PRF_TRYPROGRAMEXTENSIONS isn't passed */
/* directories in dirs parameter are always searched first even if PRF_FIRSTDIRDEF isn't passed */
...
...
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