diff --git a/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp b/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp index e66a69836265393635c0398500bedd82744c6ec3..d3c62d92c1f892028cf44f5fa030704d0a9ae824 100644 --- a/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp +++ b/thermal/interfaces/hdi_service/src/thermal_hdf_config.cpp @@ -201,8 +201,12 @@ void ThermalHdfConfig::ParseTracingNode(xmlNodePtr node) { xmlChar* xmlOutpath = xmlGetProp(node, BAD_CAST"outpath"); if (xmlOutpath != nullptr) { - this->traceConfig_.outPath = std::string(reinterpret_cast(xmlOutpath)); - xmlFree(xmlOutpath); + if (strcmp(reinterpret_cast(xmlOutpath), "/data/log/thermal/thermal-log") == 0) { + this->traceConfig_.outPath = std::string(reinterpret_cast(xmlOutpath)); + xmlFree(xmlOutpath); + } else { + THERMAL_HILOGE(COMP_HDI, "xmlOutpath is not /data/log/thermal/thermal-log"); + } } auto cur = node->xmlChildrenNode;