diff --git a/frontend/src/js/misc/wb-rootdir-wrapper.js b/frontend/src/js/misc/wb-rootdir-wrapper.js index ed8c4b2..6fc5fcd 100644 --- a/frontend/src/js/misc/wb-rootdir-wrapper.js +++ b/frontend/src/js/misc/wb-rootdir-wrapper.js @@ -69,7 +69,7 @@ class WBRootDirWrapper { for (let i = start; i < end; i++) { const loc = stm[i]; res.push([ loc[0], Math.max(0, seg[1] - loc[1]), - Math.min(loc[2], seg[1] + seg[2] - loc[1]) ]); + Math.min(loc[2] - loc[1], seg[1] + seg[2] - loc[1]) ]); } return res; }), file[1] ]; diff --git a/frontend/src/js/page/wb-download-page.js b/frontend/src/js/page/wb-download-page.js index 4b1e748..c41c4b6 100644 --- a/frontend/src/js/page/wb-download-page.js +++ b/frontend/src/js/page/wb-download-page.js @@ -95,7 +95,7 @@ class WBDownloadPage extends Component { const blk = xhr_1.response.slice(loc[1], loc[2]); // const r = new Response(blk); // r.body.pipeTo(fileStream); - writer.write(new Uint8Array(blk)); + return writer.write(new Uint8Array(blk)); }); } return prom_1;