summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-09-13 20:55:05 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-09-13 20:55:05 -0400
commit807992adca4708bd2050b1fee8074d3e4521dd30 (patch)
treea52f5e0d5cb1c8207a042631be392fbdc771e5c4 /indra/newview
parente00a8dee3f9675296df5c614b4483509c2ff55bb (diff)
DRTVWR-474: Pass updater cmd to LLLeap::create() as vector<string>.
This avoids having to tokenize a single string, avoiding swallowing backslashes in Windows pathnames in the mistaken belief they're escape characters. Alternatively, it avoids us having to double-escape them or convert them to forward slashes or whatever.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 68bb20386a..c0fcdd7c79 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1131,19 +1131,21 @@ bool LLAppViewer::init()
gGLActive = FALSE;
#if LL_WINDOWS
- std::string updater(
- "\"" + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "updater.exe") + "\"");
+ std::vector<std::string> updater
+ { gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "updater.exe") };
#elif LL_DARWIN
- std::string updater(
- "python \"" + gDirUtilp->add(gDirUtilp->getAppRODataDir(), "updater", "updater.py") + "\"");
+ // explicitly run the system Python interpreter on updater.py
+ std::vector<std::string> updater
+ { "python", gDirUtilp->add(gDirUtilp->getAppRODataDir(), "updater", "updater.py") };
#else
- std::string updater(
- "\"" + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "updater") + "\"");
+ std::vector<std::string> updater
+ { gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "updater") };
#endif
+ // add LEAP mode command-line argument to whichever of these we selected
+ updater.push_back("leap");
- // Run the updater, specifying LEAP mode. An exception from the updater
- // should bother us.
- LLLeap::create("updater process", (updater + " leap"), true);
+ // Run the updater. An exception from the updater should bother us.
+ LLLeap::create("updater process", updater, true);
// Iterate over --leap command-line options. But this is a bit tricky: if
// there's only one, it won't be an array at all.