diff --git a/desktop/src/main/stream.ts b/desktop/src/main/stream.ts index 74f6d428c30040af1c0e515c736f472b86ce4b1c..f1000c6bdef7acbced5de6cf5e114eb86f61b719 100644 --- a/desktop/src/main/stream.ts +++ b/desktop/src/main/stream.ts @@ -50,6 +50,9 @@ export const registerStreamProtocol = () => { const path = decodeURIComponent(pathname); // `hash` begins with a "#", slice that off. const hashPath = decodeURIComponent(hash.slice(1)); + log.debug( + () => `[stream] ${host} ${path}${hashPath ? "::" + hashPath : ""}`, + ); switch (host) { case "read": return handleRead(path); diff --git a/web/apps/photos/src/utils/native-stream.ts b/web/apps/photos/src/utils/native-stream.ts index 8d93becfe0336c9d14c91fbb56296b49bf55d5c6..a910d3b228a5a2e349e704d74ccdb450473f32dc 100644 --- a/web/apps/photos/src/utils/native-stream.ts +++ b/web/apps/photos/src/utils/native-stream.ts @@ -39,10 +39,12 @@ export const readStream = async ( ): Promise<{ response: Response; size: number; lastModifiedMs: number }> => { let url: URL; if (typeof pathOrZipItem == "string") { - url = new URL(`stream://read${pathOrZipItem}`); + url = new URL("stream://read"); + url.pathname = pathOrZipItem } else { const [zipPath, entryName] = pathOrZipItem; - url = new URL(`stream://read-zip${zipPath}`); + url = new URL("stream://read-zip"); + url.pathname = zipPath; url.hash = entryName; }