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
ff53db7e
Commit
ff53db7e
authored
Dec 12, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Fix parsing command line that contains spaces.
Reported by Alistair Leslie-Hughes. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
162e6c1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
explorer.c
programs/explorer/explorer.c
+6
-7
No files found.
programs/explorer/explorer.c
View file @
ff53db7e
...
@@ -658,7 +658,7 @@ static IShellFolder* get_starting_shell_folder(parameters_struct* params)
...
@@ -658,7 +658,7 @@ static IShellFolder* get_starting_shell_folder(parameters_struct* params)
return
folder
;
return
folder
;
}
}
static
int
copy_path_string
(
LPWSTR
target
,
LPWSTR
source
)
static
WCHAR
*
copy_path_string
(
WCHAR
*
target
,
WCHAR
*
source
)
{
{
INT
i
=
0
;
INT
i
=
0
;
...
@@ -667,10 +667,9 @@ static int copy_path_string(LPWSTR target, LPWSTR source)
...
@@ -667,10 +667,9 @@ static int copy_path_string(LPWSTR target, LPWSTR source)
if
(
*
source
==
'\"'
)
if
(
*
source
==
'\"'
)
{
{
source
++
;
source
++
;
while
(
*
source
!=
'\"'
)
target
[
i
++
]
=
*
source
++
;
while
(
*
source
&&
*
source
!=
'\"'
)
target
[
i
++
]
=
*
source
++
;
target
[
i
]
=
0
;
target
[
i
]
=
0
;
source
++
;
if
(
*
source
)
source
++
;
i
+=
2
;
}
}
else
else
{
{
...
@@ -678,7 +677,7 @@ static int copy_path_string(LPWSTR target, LPWSTR source)
...
@@ -678,7 +677,7 @@ static int copy_path_string(LPWSTR target, LPWSTR source)
target
[
i
]
=
0
;
target
[
i
]
=
0
;
}
}
PathRemoveBackslashW
(
target
);
PathRemoveBackslashW
(
target
);
return
i
;
return
source
;
}
}
...
@@ -741,12 +740,12 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
...
@@ -741,12 +740,12 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
else
if
(
strncmpW
(
p
,
arg_root
,
sizeof
(
arg_root
)
/
sizeof
(
WCHAR
))
==
0
)
else
if
(
strncmpW
(
p
,
arg_root
,
sizeof
(
arg_root
)
/
sizeof
(
WCHAR
))
==
0
)
{
{
p
+=
sizeof
(
arg_root
)
/
sizeof
(
WCHAR
);
p
+=
sizeof
(
arg_root
)
/
sizeof
(
WCHAR
);
p
+=
copy_path_string
(
parameters
->
root
,
p
);
p
=
copy_path_string
(
parameters
->
root
,
p
);
}
}
else
if
(
strncmpW
(
p
,
arg_select
,
sizeof
(
arg_select
)
/
sizeof
(
WCHAR
))
==
0
)
else
if
(
strncmpW
(
p
,
arg_select
,
sizeof
(
arg_select
)
/
sizeof
(
WCHAR
))
==
0
)
{
{
p
+=
sizeof
(
arg_select
)
/
sizeof
(
WCHAR
);
p
+=
sizeof
(
arg_select
)
/
sizeof
(
WCHAR
);
p
+=
copy_path_string
(
parameters
->
selection
,
p
);
p
=
copy_path_string
(
parameters
->
selection
,
p
);
if
(
!
parameters
->
root
[
0
])
if
(
!
parameters
->
root
[
0
])
copy_path_root
(
parameters
->
root
,
copy_path_root
(
parameters
->
root
,
parameters
->
selection
);
parameters
->
selection
);
...
...
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