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
9f3f918f
Commit
9f3f918f
authored
Dec 21, 2015
by
Jeremy White
Committed by
Alexandre Julliard
Dec 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Preserve a '/' delimiter in GetLongPathName and GetShortPathName.
Signed-off-by:
Jeremy White
<
jwhite@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17ddd047
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
path.c
dlls/kernel32/path.c
+6
-6
path.c
dlls/kernel32/tests/path.c
+0
-3
No files found.
dlls/kernel32/path.c
View file @
9f3f918f
...
...
@@ -334,10 +334,10 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
/* check for path delimiters and reproduce them */
if
(
shortpath
[
sp
]
==
'\\'
||
shortpath
[
sp
]
==
'/'
)
{
if
(
!
lp
||
tmplongpath
[
lp
-
1
]
!=
'\\'
)
if
(
!
lp
||
(
tmplongpath
[
lp
-
1
]
!=
'\\'
&&
tmplongpath
[
lp
-
1
]
!=
'/'
)
)
{
/* strip double
"\\"
*/
tmplongpath
[
lp
++
]
=
'\\'
;
/* strip double
delimiters
*/
tmplongpath
[
lp
++
]
=
shortpath
[
sp
]
;
}
tmplongpath
[
lp
]
=
0
;
/* terminate string */
sp
++
;
...
...
@@ -492,10 +492,10 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
/* check for path delimiters and reproduce them */
if
(
longpath
[
lp
]
==
'\\'
||
longpath
[
lp
]
==
'/'
)
{
if
(
!
sp
||
tmpshortpath
[
sp
-
1
]
!=
'\\'
)
if
(
!
sp
||
(
tmpshortpath
[
sp
-
1
]
!=
'\\'
&&
tmpshortpath
[
sp
-
1
]
!=
'/'
)
)
{
/* strip double
"\\"
*/
tmpshortpath
[
sp
]
=
'\\'
;
/* strip double
delimiters
*/
tmpshortpath
[
sp
]
=
longpath
[
lp
]
;
sp
++
;
}
tmpshortpath
[
sp
]
=
0
;
/* terminate string */
...
...
dlls/kernel32/tests/path.c
View file @
9f3f918f
...
...
@@ -863,18 +863,15 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
if
(
pGetLongPathNameA
)
{
sprintf
(
tmpstr
,
"%s/%s"
,
LONGDIR
,
LONGFILE
);
ok
(
GetLongPathNameA
(
tmpstr
,
tmpstr1
,
MAX_PATH
),
"GetLongPathNameA failed
\n
"
);
todo_wine
ok
(
lstrcmpiA
(
tmpstr
,
tmpstr1
)
==
0
,
"GetLongPathNameA returned '%s' instead of '%s'
\n
"
,
tmpstr1
,
tmpstr
);
sprintf
(
tmpstr
,
"%s/%s"
,
SHORTDIR
,
SHORTFILE
);
ok
(
GetLongPathNameA
(
tmpstr
,
tmpstr1
,
MAX_PATH
),
"GetLongPathNameA failed
\n
"
);
todo_wine
ok
(
lstrcmpiA
(
tmpstr
,
tmpstr1
)
==
0
,
"GetLongPathNameA returned '%s' instead of '%s'
\n
"
,
tmpstr1
,
tmpstr
);
}
sprintf
(
tmpstr
,
"%s/%s"
,
SHORTDIR
,
SHORTFILE
);
ok
(
GetShortPathNameA
(
tmpstr
,
tmpstr1
,
MAX_PATH
),
"GetShortPathNameA failed
\n
"
);
todo_wine
ok
(
lstrcmpiA
(
tmpstr
,
tmpstr1
)
==
0
,
"GetShortPathNameA returned '%s' instead of '%s'
\n
"
,
tmpstr1
,
tmpstr
);
...
...
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