Chromium Code Reviews| Index: chrome/installer/mini_installer/mini_installer.cc |
| diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc |
| index be29092fd8adaf66086f878babd33898b74a3655..c62323fc0924de67b29d15794be1b32e7c43c1ca 100644 |
| --- a/chrome/installer/mini_installer/mini_installer.cc |
| +++ b/chrome/installer/mini_installer/mini_installer.cc |
| @@ -249,6 +249,7 @@ void AppendCommandLineFlags(const Configuration& configuration, |
| // - configuration.program() returns the first command line argument |
| // passed into the program (that the user probably typed in this case). |
| // "mini_installer.exe" |
| + // "mini_installer (1).exe" |
| // "mini_installer" |
| // "out\Release\mini_installer" |
| // - |exe_name| is the executable file of the current process. |
| @@ -256,7 +257,7 @@ void AppendCommandLineFlags(const Configuration& configuration, |
| // |
| // Note that there are three possibilities to handle here. |
| // Receive a cmdline containing: |
| - // 1) executable name WITH extension |
| + // 1) executable name WITH extension (possibly containing a space) |
| // 2) executable name with NO extension |
| // 3) NO executable name as part of cmdline |
| const wchar_t* cmd_to_append = L""; |
| @@ -275,7 +276,7 @@ void AppendCommandLineFlags(const Configuration& configuration, |
| // extension. Then move to the space following the token.) |
| const wchar_t* tmp = SearchStringI(configuration.command_line(), |
| arg0_base_name); |
| - tmp = SearchStringI(tmp, L" "); |
| + tmp = SearchStringI(tmp + ::lstrlen(arg0_base_name), L" "); |
|
bcwhite
2017/01/26 15:36:22
If you know the length of the program name, why do
grt (UTC plus 2)
2017/01/26 16:07:47
I think it's possible that there could be a traili
|
| cmd_to_append = tmp; |
| } |