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
1a688cd0
Commit
1a688cd0
authored
Aug 06, 2007
by
Peter Beutner
Committed by
Alexandre Julliard
Aug 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix _makepath().
parent
2b3c19fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
dir.c
dlls/msvcrt/dir.c
+14
-12
dir.c
dlls/msvcrt/tests/dir.c
+1
-2
No files found.
dlls/msvcrt/dir.c
View file @
1a688cd0
...
...
@@ -853,7 +853,7 @@ VOID CDECL _makepath(char * path, const char * drive,
const
char
*
directory
,
const
char
*
filename
,
const
char
*
extension
)
{
char
c
h
;
char
*
p
=
pat
h
;
TRACE
(
"(%s %s %s %s)
\n
"
,
debugstr_a
(
drive
),
debugstr_a
(
directory
),
debugstr_a
(
filename
),
debugstr_a
(
extension
)
);
...
...
@@ -861,28 +861,30 @@ VOID CDECL _makepath(char * path, const char * drive,
if
(
!
path
)
return
;
path
[
0
]
=
'\0'
;
if
(
drive
&&
drive
[
0
])
{
path
[
0
]
=
drive
[
0
];
path
[
1
]
=
':'
;
path
[
2
]
=
0
;
*
p
++
=
drive
[
0
];
*
p
++
=
':'
;
*
p
=
0
;
}
if
(
directory
&&
directory
[
0
])
{
strcat
(
path
,
directory
);
ch
=
path
[
strlen
(
path
)
-
1
];
if
(
ch
!=
'/'
&&
ch
!=
'\\'
)
strcat
(
path
,
"
\\
"
);
strcpy
(
p
,
directory
);
p
+=
strlen
(
directory
)
-
1
;
if
(
*
p
!=
'/'
&&
*
p
!=
'\\'
)
{
strcat
(
p
,
"
\\
"
);
p
++
;
}
p
++
;
}
if
(
filename
&&
filename
[
0
])
{
strc
at
(
path
,
filename
);
strc
py
(
p
,
filename
);
if
(
extension
&&
extension
[
0
])
{
if
(
extension
[
0
]
!=
'.'
)
strcat
(
p
ath
,
"."
);
strcat
(
p
ath
,
extension
);
strcat
(
p
,
"."
);
strcat
(
p
,
extension
);
}
}
TRACE
(
"returning %s
\n
"
,
path
);
...
...
dlls/msvcrt/tests/dir.c
View file @
1a688cd0
...
...
@@ -43,8 +43,7 @@ static void test_makepath(void)
/* this works with native and e.g. Freelancer depends on it */
strcpy
(
buffer
,
"foo"
);
_makepath
(
buffer
,
NULL
,
buffer
,
"dummy.txt"
,
NULL
);
todo_wine
{
ok
(
strcmp
(
buffer
,
"foo
\\
dummy.txt"
)
==
0
,
"unexpected result: %s
\n
"
,
buffer
);
}
ok
(
strcmp
(
buffer
,
"foo
\\
dummy.txt"
)
==
0
,
"unexpected result: %s
\n
"
,
buffer
);
}
static
void
test_fullpath
(
void
)
...
...
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