From c988884ab1b567f71b75300b81ea2aaf1f0e1891 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 1 May 2024 17:56:46 +0530 Subject: [PATCH] Setting pathname had no effect --- web/apps/photos/src/utils/native-stream.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/apps/photos/src/utils/native-stream.ts b/web/apps/photos/src/utils/native-stream.ts index a910d3b228..b20cb9290a 100644 --- a/web/apps/photos/src/utils/native-stream.ts +++ b/web/apps/photos/src/utils/native-stream.ts @@ -39,12 +39,10 @@ export const readStream = async ( ): Promise<{ response: Response; size: number; lastModifiedMs: number }> => { let url: URL; if (typeof pathOrZipItem == "string") { - url = new URL("stream://read"); - url.pathname = pathOrZipItem + url = new URL(`stream://read${encodeURIComponent(pathOrZipItem)}`); } else { const [zipPath, entryName] = pathOrZipItem; - url = new URL("stream://read-zip"); - url.pathname = zipPath; + url = new URL(`stream://read-zip${encodeURIComponent(zipPath)}`); url.hash = entryName; }