From a99309a176eb7f6443aa02c80c63e99f34da647e Mon Sep 17 00:00:00 2001 From: liuhaotian Date: Mon, 20 Nov 2023 16:20:19 +0800 Subject: [PATCH] fix: convert mode to flag Signed-off-by: liuhaotian Change-Id: I126df494129a07a1a4a40175986c37c8e200eeaf --- interfaces/kits/js/src/mod_fs/properties/open.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/kits/js/src/mod_fs/properties/open.cpp b/interfaces/kits/js/src/mod_fs/properties/open.cpp index d13c83b40..3d58ffc29 100644 --- a/interfaces/kits/js/src/mod_fs/properties/open.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/open.cpp @@ -182,8 +182,8 @@ static tuple OpenByFileDataUri(Uri &uri, const string &uriStr, unsi static tuple OpenFileByBroker(const Uri &uri, uint32_t mode) { uint32_t flag = (mode % MAX_WANT_FLAG) > 0 ? - AAFwk::Want::FLAG_AUTH_READ_URI_PERMISSION : - AAFwk::Want::FLAG_AUTH_WRITE_URI_PERMISSION; + AAFwk::Want::FLAG_AUTH_WRITE_URI_PERMISSION : + AAFwk::Want::FLAG_AUTH_READ_URI_PERMISSION; int ret = AAFwk::AbilityManagerClient::GetInstance()->OpenFile(uri, flag); if (ret < 0) { HILOGE("Failed to open file by Broker error %{public}d", ret); -- Gitee