|
@@ -921,7 +921,7 @@ SATHTTP_API int DownloadScript(std::string url, std::string strCaseId, std::stri
|
|
// 同时下载脚本目录到指定目录中;// url地址可能包含中文,此处需要转码;
|
|
// 同时下载脚本目录到指定目录中;// url地址可能包含中文,此处需要转码;
|
|
stScriptUrlResp.strURL = CCurlClient::ParseURLAndEncode(stScriptUrlResp.strURL);
|
|
stScriptUrlResp.strURL = CCurlClient::ParseURLAndEncode(stScriptUrlResp.strURL);
|
|
if ( g_curl.Download(stScriptUrlResp.strURL, strSaveDir, 20000) ) {
|
|
if ( g_curl.Download(stScriptUrlResp.strURL, strSaveDir, 20000) ) {
|
|
- stScriptUrlResp._strFileName = strFileName.substr(0, strFileName.find_first_of('.'));
|
|
|
|
|
|
+ stScriptUrlResp._strFileName = strFileName.substr(0, strFileName.find_last_of('.'));
|
|
stScriptUrlResp._strScripFile = strSaveDir;
|
|
stScriptUrlResp._strScripFile = strSaveDir;
|
|
// 释放内存;
|
|
// 释放内存;
|
|
cJSON_Delete(pRoot);
|
|
cJSON_Delete(pRoot);
|