From 77982f862d6e9c0da1906aeea579a0a860821c71 Mon Sep 17 00:00:00 2001 From: fengyang Date: Thu, 22 May 2025 20:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fengyang --- services/common/src/bundle_active_config_reader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/common/src/bundle_active_config_reader.cpp b/services/common/src/bundle_active_config_reader.cpp index 5a8467e..95c27f8 100644 --- a/services/common/src/bundle_active_config_reader.cpp +++ b/services/common/src/bundle_active_config_reader.cpp @@ -95,7 +95,10 @@ bool BundleActiveConfigReader::GetJsonFromFile(const char *filePath, Json::Value } BUNDLE_ACTIVE_LOGD("Read from %{private}s", realPath.c_str()); std::string data; - LoadStringFromFile(realPath.c_str(), data); + if (!LoadStringFromFile(realPath.c_str(), data)) { + BUNDLE_ACTIVE_LOGE("load string from %{private}s failed", realPath.c_str()); + return false; + } if (data.empty()) { return false; } -- Gitee