Bug 843020 - Quote parameters used in invoking the desktop browser via ShellExecute in the Win8 CEH. Fixes problems with file names with spaces. r=bbondy
authorJim Mathies <jmathies@mozilla.com>
Wed, 20 Feb 2013 09:00:59 -0600
changeset 122462 4780b6fe2826e6eb2a91b0d3bd70fa116cc3e11e
parent 122461 fa3150c558e0eebbc87d53caa7418330574a78db
child 122463 fec94a52b86faac4ca3a2ee42dadf1dd61849fed
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs843020
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 843020 - Quote parameters used in invoking the desktop browser via ShellExecute in the Win8 CEH. Fixes problems with file names with spaces. r=bbondy
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
--- a/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
+++ b/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
@@ -540,17 +540,19 @@ void CExecuteCommandVerb::LaunchDesktopB
     return;
   }
 
   // If a taskbar shortcut, link or local file is clicked, the target will
   // be the browser exe or file.
   CStringW params;
   if (!IsTargetBrowser()) {
     params += "-url ";
+    params += "\"";
     params += mTarget;
+    params += "\"";
   }
 
   Log(L"Desktop Launch: verb:%s exe:%s params:%s", mVerb, browserPath, params); 
 
   SHELLEXECUTEINFOW seinfo;
   memset(&seinfo, 0, sizeof(seinfo));
   seinfo.cbSize = sizeof(SHELLEXECUTEINFOW);
   seinfo.fMask  = NULL;