diff --git a/common/utils/src/bundle_file_util.cpp b/common/utils/src/bundle_file_util.cpp index 025487e52d4783028a4911d21870a97662085274..f4931aaf7fe327a8e805e59e92aeb2b59a6167dc 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; }