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
c4d85843
Commit
c4d85843
authored
Oct 16, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Get the current directory from the process parameters in create_cmd_process().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec0c5a11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
process.c
dlls/kernel32/process.c
+4
-3
No files found.
dlls/kernel32/process.c
View file @
c4d85843
...
...
@@ -2469,7 +2469,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
*
* Create a new cmd shell process for a .BAT file.
*/
static
BOOL
create_cmd_process
(
LP
CWSTR
cur_dir
,
LP
SECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
static
BOOL
create_cmd_process
(
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
BOOL
inherit
,
DWORD
flags
,
LPSTARTUPINFOW
startup
,
const
RTL_USER_PROCESS_PARAMETERS
*
params
,
LPPROCESS_INFORMATION
info
)
...
...
@@ -2480,7 +2480,7 @@ static BOOL create_cmd_process( LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSE
static
const
WCHAR
slashscW
[]
=
{
' '
,
'/'
,
's'
,
'/'
,
'c'
,
' '
,
0
};
static
const
WCHAR
quotW
[]
=
{
'"'
,
0
};
WCHAR
comspec
[
MAX_PATH
];
WCHAR
*
newcmdline
;
WCHAR
*
newcmdline
,
*
cur_dir
=
NULL
;
BOOL
ret
;
if
(
!
GetEnvironmentVariableW
(
comspecW
,
comspec
,
ARRAY_SIZE
(
comspec
)))
...
...
@@ -2498,6 +2498,7 @@ static BOOL create_cmd_process( LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSE
strcatW
(
newcmdline
,
quotW
);
strcatW
(
newcmdline
,
params
->
CommandLine
.
Buffer
);
strcatW
(
newcmdline
,
quotW
);
if
(
params
->
CurrentDirectory
.
DosPath
.
Length
)
cur_dir
=
params
->
CurrentDirectory
.
DosPath
.
Buffer
;
ret
=
CreateProcessW
(
comspec
,
newcmdline
,
psa
,
tsa
,
inherit
,
flags
|
CREATE_UNICODE_ENVIRONMENT
,
params
->
Environment
,
cur_dir
,
startup
,
info
);
...
...
@@ -2705,7 +2706,7 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
if
(
!
strcmpiW
(
p
,
batW
)
||
!
strcmpiW
(
p
,
cmdW
)
)
{
TRACE
(
"starting %s as batch binary
\n
"
,
debugstr_w
(
name
)
);
retv
=
create_cmd_process
(
cur_dir
,
process_attr
,
thread_attr
,
retv
=
create_cmd_process
(
process_attr
,
thread_attr
,
inherit
,
flags
,
startup_info
,
params
,
info
);
break
;
}
...
...
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