From 383ad3857744a71a0a48c9aefbaecbe479857a1f Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Tue, 5 Nov 2024 16:45:15 +0800 Subject: [PATCH] add code sign for dataPreloadApp Signed-off-by: sunjiakun --- .../inner_api/code_sign_utils/src/code_sign_helper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interfaces/inner_api/code_sign_utils/src/code_sign_helper.cpp b/interfaces/inner_api/code_sign_utils/src/code_sign_helper.cpp index d55c85c..bec7200 100644 --- a/interfaces/inner_api/code_sign_utils/src/code_sign_helper.cpp +++ b/interfaces/inner_api/code_sign_utils/src/code_sign_helper.cpp @@ -17,6 +17,7 @@ #include "code_sign_helper.h" #include "constants.h" +#include "directory_ex.h" #include "file_helper.h" #include "log.h" @@ -52,7 +53,9 @@ int32_t CodeSignHelper::ProcessOneFile() return ret; } ShowCodeSignInfo(targetFile, arg); - if (!CheckFilePathValid(targetFile, Constants::ENABLE_APP_BASE_PATH)) { + std::string realPath; + if (!OHOS::PathToRealPath(targetFile, realPath)) { + LOG_INFO("get real path failed, path = %{public}s", targetFile.c_str()); return CS_ERR_FILE_PATH; } ret = CodeSignUtils::IsSupportFsVerity(targetFile); -- Gitee