Setting pathname had no effect
This commit is contained in:
parent
b967d4bbea
commit
c988884ab1
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue