From 423a186aa6c48b5ab7c9884700a63df890cbb2eb Mon Sep 17 00:00:00 2001 From: lvyuanyuan Date: Thu, 10 Aug 2023 03:14:29 +0000 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: lvyuanyuan Change-Id: Ie5a3fb4bfdd6b1d49892c4cf53f3092b62f6c4d0 --- .../native/remote_file_share/src/remote_file_share.cpp | 2 +- interfaces/kits/js/file_share/grant_uri_permission.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp b/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp index 85671277a..c31ff7b26 100644 --- a/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp +++ b/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp @@ -312,7 +312,7 @@ static int32_t SetPublicDirHmdfsInfo(const std::string &physicalPath, const std: LOGE("Failed to get physical path stat with %{public}d", -errno); return -errno; } - hui.fileSize = buf.st_size; + hui.fileSize = static_cast(buf.st_size); return 0; } diff --git a/interfaces/kits/js/file_share/grant_uri_permission.cpp b/interfaces/kits/js/file_share/grant_uri_permission.cpp index 33c1ddc11..783fe7c81 100644 --- a/interfaces/kits/js/file_share/grant_uri_permission.cpp +++ b/interfaces/kits/js/file_share/grant_uri_permission.cpp @@ -226,7 +226,7 @@ namespace ModuleFileShare { uriPermInfo.bundleName = string(bundleName.get()); if (NVal(env, funcArg[NARG_POS::THIRD]).TypeIs(napi_number)) { - auto [succFlag, flag] = NVal(env, funcArg[NARG_POS::THIRD]).ToInt32(); + auto [succFlag, flag] = NVal(env, funcArg[NARG_POS::THIRD]).ToUint32(); uriPermInfo.flag = flag; uriPermInfo.mode = GetModeFromFlag(flag); } else if (NVal(env, funcArg[NARG_POS::THIRD]).TypeIs(napi_string)) { -- Gitee