Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eba2f432
Commit
eba2f432
authored
Oct 30, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add special case for "." and ".." to GetLongPathName.
parent
d57444a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
path.c
dlls/kernel32/path.c
+11
-0
path.c
dlls/kernel32/tests/path.c
+0
-4
No files found.
dlls/kernel32/path.c
View file @
eba2f432
...
...
@@ -358,6 +358,17 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
for
(;
*
p
&&
*
p
!=
'/'
&&
*
p
!=
'\\'
;
p
++
);
tmplen
=
p
-
(
shortpath
+
sp
);
lstrcpynW
(
tmplongpath
+
lp
,
shortpath
+
sp
,
tmplen
+
1
);
if
(
tmplongpath
[
lp
]
==
'.'
)
{
if
(
tmplen
==
1
||
(
tmplen
==
2
&&
tmplongpath
[
lp
+
1
]
==
'.'
))
{
lp
+=
tmplen
;
sp
+=
tmplen
;
continue
;
}
}
/* Check if the file exists and use the existing file name */
goit
=
FindFirstFileW
(
tmplongpath
,
&
wfd
);
if
(
goit
==
INVALID_HANDLE_VALUE
)
...
...
dlls/kernel32/tests/path.c
View file @
eba2f432
...
...
@@ -1958,7 +1958,6 @@ static void test_relative_path(void)
strcpy
(
buf
,
"deadbeef"
);
ret
=
pGetLongPathNameA
(
"."
,
buf
,
MAX_PATH
);
ok
(
ret
,
"GetLongPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
"."
),
"expected ., got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
"."
,
buf
,
MAX_PATH
);
...
...
@@ -1968,7 +1967,6 @@ todo_wine
strcpy
(
buf
,
"deadbeef"
);
ret
=
pGetLongPathNameA
(
".."
,
buf
,
MAX_PATH
);
ok
(
ret
,
"GetLongPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
".."
),
"expected .., got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
".."
,
buf
,
MAX_PATH
);
...
...
@@ -1977,9 +1975,7 @@ todo_wine
strcpy
(
buf
,
"deadbeef"
);
ret
=
pGetLongPathNameA
(
"..
\\
foo
\\
file"
,
buf
,
MAX_PATH
);
todo_wine
ok
(
ret
,
"GetLongPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
"..
\\
foo
\\
file"
),
"expected ..
\\
foo
\\
file, got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
"..
\\
foo
\\
file"
,
buf
,
MAX_PATH
);
...
...
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