From 1c7711c663b8df457683d61b292c7aa88b2bb8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E9=94=A6=E5=B1=B1?= <791770396@qq.com> Date: Mon, 11 Aug 2025 08:03:37 +0000 Subject: [PATCH] update common/utils/src/bundle_file_util.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 曾锦山 <791770396@qq.com> --- common/utils/src/bundle_file_util.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/utils/src/bundle_file_util.cpp b/common/utils/src/bundle_file_util.cpp index 025487e52d..f4931aaf7f 100644 --- a/common/utils/src/bundle_file_util.cpp +++ b/common/utils/src/bundle_file_util.cpp @@ -42,13 +42,14 @@ constexpr int64_t MAX_HAP_SIZE = ONE_GB * 4; // 4GB constexpr int PATH_MAX_SIZE = 256; const char FILE_SEPARATOR_CHAR = '/'; constexpr uint8_t MAX_HAP_NUMBER = 128; -constexpr double LOW_PARTITION_SPACE_THRESHOLD = 0.1; +constexpr double LOW_PARTITION_SPACE_THRESHOLD = 0.1; } // namespace namespace OHOS { namespace AppExecFwk { bool BundleFileUtil::CheckFilePath(const std::string &bundlePath, std::string &realPath) { + // huawei if (!CheckFileName(bundlePath)) { APP_LOGE("bundle file path invalid"); return false; @@ -63,7 +64,8 @@ bool BundleFileUtil::CheckFilePath(const std::string &bundlePath, std::string &r APP_LOGE("file is not hap, hsp or hqf or sig or ap or json"); return false; } - if (!PathToRealPath(bundlePath, realPath)) { + if(!PathToRealPath(bundlePath, realPath)){ + APP_LOGE("file is not real path"); return false; } -- Gitee