From d564496681467f2231452605c69c600354777502 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Wed, 1 Jul 2026 15:34:35 +0800 Subject: [PATCH] fix(harmony): prepend file:// scheme to getURL() to enable local image loading from hot update bundle --- harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets b/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets index 8392235d..f4c74185 100644 --- a/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets +++ b/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets @@ -16,7 +16,11 @@ export class PushyFileJSBundleProvider extends JSBundleProvider { } getURL(): string { - return this.updateContext.getBundleUrl(); + const path = this.updateContext.getBundleUrl(); + if (path && !path.startsWith('file://')) { + return 'file://' + path; + } + return path; } async getBundle(): Promise {