Browse Source

Z991239-5733 #comment feat: 修复适配器策略安装路径取值bug

Signed-Off-By: commit-hook
刘文涛80174520 11 tháng trước cách đây
mục cha
commit
d4ba2112ed
1 tập tin đã thay đổi với 4 bổ sung9 xóa
  1. 4 9
      Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

+ 4 - 9
Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

@@ -4669,7 +4669,7 @@ ErrorCodeEnum CUpgradeTaskFSM::CreateNewDepVersion(CSimpleStringA NewSoftwareVer
 	}
 
 	//新路径
-	CSimpleStringA strNewVerPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR, rootDepPath.GetData(), NewSoftwareVersion.GetData());
+	CSimpleStringA strNewVerPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", rootDepPath.GetData(), NewSoftwareVersion.GetData());
 
 	if (m_currentDepVersion == NewSoftwareVersion)
 	{
@@ -5381,7 +5381,7 @@ bool CUpgradeTaskFSM::GetDepRootTypePath(int rootType, CSimpleStringA& Path)
 
 		}
 		else {
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetRootTypePath")("get upgradeVer path is error");
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetRootTypePath")("get currDepVer path is error");
 			return false;
 		}
 	}
@@ -5407,7 +5407,6 @@ bool CUpgradeTaskFSM::GetDepRootTypePath(int rootType, CSimpleStringA& Path)
 
 	}
 	else if (rootType == 2) {
-		
 		ErrorCodeEnum Error = m_pEntity->GetFunction()->GetPath("Dep", tempPath);//例如:C:\Run\dep\4.8.1.1  /opt/Run/dep/4.8.1.1
 		if (Error_Succeed == Error) {
 			if (!tempPath.IsNullOrEmpty()) {
@@ -5429,14 +5428,10 @@ bool CUpgradeTaskFSM::GetDepRootTypePath(int rootType, CSimpleStringA& Path)
 		ErrorCodeEnum Error = m_pEntity->GetFunction()->GetPath("DepBase", tempPath);//例如:C:\Run\dep\4.9.1.1  /opt/Run/dep/4.9.1.1
 		if (Error_Succeed == Error) {
 			if (!tempPath.IsNullOrEmpty()) {
-				if (!m_currentTask.pack_version.IsNullOrEmpty()) {
-					Path = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", tempPath.GetData(), m_currentTask.pack_version.GetData());
-				}
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetRootTypePath")("m_currentTask.pack_version is null ,get currDepVer path is null");
-				return false;
+				Path = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", tempPath.GetData(), m_currentTask.pack_version.GetData());
 			}
 			else {
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetRootTypePath")("get currDepVer path is null");
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetRootTypePath")("get upgradeVer path is null");
 				return false;
 			}