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
d57444a6
Commit
d57444a6
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 GetShortPathName.
parent
ff7511cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
path.c
dlls/kernel32/path.c
+10
-0
path.c
dlls/kernel32/tests/path.c
+0
-4
No files found.
dlls/kernel32/path.c
View file @
d57444a6
...
...
@@ -489,6 +489,16 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
tmplen
=
p
-
(
longpath
+
lp
);
lstrcpynW
(
tmpshortpath
+
sp
,
longpath
+
lp
,
tmplen
+
1
);
if
(
tmpshortpath
[
sp
]
==
'.'
)
{
if
(
tmplen
==
1
||
(
tmplen
==
2
&&
tmpshortpath
[
sp
+
1
]
==
'.'
))
{
sp
+=
tmplen
;
lp
+=
tmplen
;
continue
;
}
}
/* Check if the file exists and use the existing short file name */
goit
=
FindFirstFileW
(
tmpshortpath
,
&
wfd
);
if
(
goit
==
INVALID_HANDLE_VALUE
)
goto
notfound
;
...
...
dlls/kernel32/tests/path.c
View file @
d57444a6
...
...
@@ -1963,7 +1963,6 @@ todo_wine
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
"."
,
buf
,
MAX_PATH
);
ok
(
ret
,
"GetShortPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
"."
),
"expected ., got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
...
...
@@ -1974,7 +1973,6 @@ todo_wine
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
".."
,
buf
,
MAX_PATH
);
ok
(
ret
,
"GetShortPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
".."
),
"expected .., got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
...
...
@@ -1985,9 +1983,7 @@ todo_wine
ok
(
!
strcmp
(
buf
,
"..
\\
foo
\\
file"
),
"expected ..
\\
foo
\\
file, got %s
\n
"
,
buf
);
strcpy
(
buf
,
"deadbeef"
);
ret
=
GetShortPathNameA
(
"..
\\
foo
\\
file"
,
buf
,
MAX_PATH
);
todo_wine
ok
(
ret
,
"GetShortPathName error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
"..
\\
foo
\\
file"
),
"expected ..
\\
foo
\\
file, got %s
\n
"
,
buf
);
SetCurrentDirectoryA
(
".."
);
...
...
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