From fda8efc4140ae9779a8e30d0ce6777b8ff77a2cc Mon Sep 17 00:00:00 2001 From: SWangHash <88996709+SWangHash@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:46:57 +0800 Subject: [PATCH] fix(ohos): ensure reveal_in_explorer arg has file:// prefix --- src/apps/ohos/entry/src/main/ets/entryability/EntryAbility.ets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/ohos/entry/src/main/ets/entryability/EntryAbility.ets b/src/apps/ohos/entry/src/main/ets/entryability/EntryAbility.ets index 5595518f52..70c7e8b733 100644 --- a/src/apps/ohos/entry/src/main/ets/entryability/EntryAbility.ets +++ b/src/apps/ohos/entry/src/main/ets/entryability/EntryAbility.ets @@ -164,6 +164,9 @@ export default class EntryAbility extends RustAbility { }) }, 40) RustModule.registerArktsFunction('reveal_in_explorer', async (err: Error, arg: string): Promise => { + if (!arg.startsWith('file://')) { + arg = 'file://' + arg; + } const path = arg.replace('file://', 'file://docs'); const want: Want = { bundleName: 'com.huawei.hmos.filemanager',