Explorar el Código

Z991239-5199 #comment feat: be consistent with windows, add install params

陈良瑜80374463 hace 1 año
padre
commit
06415247b7
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  1. 11 1
      Module/mod_chromium/CModTools.cpp

+ 11 - 1
Module/mod_chromium/CModTools.cpp

@@ -805,7 +805,17 @@ namespace Chromium {
 			CSimpleString runningVer = "";
 			m_pEntity->GetFunction()->GetRunningVersion(runningVer);
 			dstInstallUrl.append("?terminalVersion=").append(runningVer.GetData());
-			dstInstallUrl = UrlEncoder::Encode(dstInstallUrl);
+#if defined(RVC_OS_LINUX)
+			auto replaceAll = [](std::string& str, const std::string& search, const std::string& replace) {
+				size_t pos = 0;
+				while ((pos = str.find(search, pos)) != std::string::npos) {
+					str.replace(pos, search.length(), replace);
+					pos += replace.length();
+				}
+			};
+			replaceAll(dstInstallUrl, "&", "\\&");
+#endif // RVC_OS_WIN
+
 			auto strCmdLine = generateInstallCmd(dstInstallUrl);
 			auto openCefRet = openCef(strCmdLine, false);
 			if (Error_Succeed == openCefRet.first)