diff --git a/interfaces/innerkits/native/file_share/include/file_share.h b/interfaces/innerkits/native/file_share/include/file_share.h index 58b3868693ed2fd7cbfca03d92185abc59d0d2a4..b2c8c8d998bc5854c9b59727d136fc2069452899 100644 --- a/interfaces/innerkits/native/file_share/include/file_share.h +++ b/interfaces/innerkits/native/file_share/include/file_share.h @@ -48,7 +48,9 @@ const vector SANDBOX_PATH = { "/data/storage/el2/database", "/data/storage/el1/base", "/data/storage/ark-cache", - "/data/storage/ark-profile" + "/data/storage/ark-profile", + "/data/storage/el2/distributedfiles", + "/data/storage/el2/auth_groups" }; const vector LOWER_PATH = { @@ -58,7 +60,9 @@ const vector LOWER_PATH = { "/data/app/el2//database/", "/data/app/el1//base/", "/data/local/ark-cache/", - "/data/local/ark-profile//" + "/data/local/ark-profile//", + "/mnt/hmdfs//account/merge_view/data/", + "/mnt/hmdfs//non_account/merge_view/data" }; } diff --git a/interfaces/innerkits/native/file_share/src/file_share.cpp b/interfaces/innerkits/native/file_share/src/file_share.cpp index 15f74aa32bbb9a32af2115ab8dc6292d2420cfa6..df600bde5ae3d42a380e1157efa24f59e78d23ff 100644 --- a/interfaces/innerkits/native/file_share/src/file_share.cpp +++ b/interfaces/innerkits/native/file_share/src/file_share.cpp @@ -47,7 +47,7 @@ static int32_t GetTargetInfo(int32_t tokenId, string &bundleName, string ¤ int32_t result = Security::AccessToken::AccessTokenKit::GetHapTokenInfo(tokenId, hapInfo); if (result != 0) { LOGE("Failed to get hap token info %{public}d", result); - return result; + return -EINVAL; } bundleName = hapInfo.bundleName; currentUid = to_string(hapInfo.userID); diff --git a/interfaces/kits/js/@ohos.remotefileshare.d.ts b/interfaces/kits/js/@ohos.remotefileshare.d.ts index 40d946ae0eea65094d2b48b29bdb88b756af089b..cd1876a9e1143b5de4064640598ab37b852b4a27 100644 --- a/interfaces/kits/js/@ohos.remotefileshare.d.ts +++ b/interfaces/kits/js/@ohos.remotefileshare.d.ts @@ -18,7 +18,7 @@ import {AsyncCallback, Callback} from "./basic"; /** * Provides remote file share APIs * - * @since 8 + * @since 10 * @sysCap N/A * @devices phone, tablet */ @@ -26,7 +26,7 @@ declare namespace Remotefileshare { /** * Create the remote share path of src share file. * - * @since 8 + * @since 10 */ function createSharePath(fd: number, cid: string, callback: AsyncCallback): void; function createSharePath(fd: number, cid: string): Promise; diff --git a/test/unittest/file_share_native/file_share_test.cpp b/test/unittest/file_share_native/file_share_test.cpp index 59fac0e794c3410c5e72ff2d738f233a15383ceb..da0ed72ed7e514e936d3d3b2edf72a9aa8e9fe82 100644 --- a/test/unittest/file_share_native/file_share_test.cpp +++ b/test/unittest/file_share_native/file_share_test.cpp @@ -31,7 +31,6 @@ namespace { using namespace OHOS::Security::AccessToken; const int E_OK = 0; - const int E_INVALID_ARGUMENT = 12100002; class FileShareTest : public testing::Test { public: @@ -124,7 +123,7 @@ namespace { int32_t flag = 3; int32_t ret = FileShare::CreateShareFile(uri, tokenId, flag); - EXPECT_EQ(ret, E_INVALID_ARGUMENT); + EXPECT_EQ(ret, -EINVAL); GTEST_LOG_(INFO) << "FileShareTest-end File_share_CreateShareFile_0002"; }