Skip to content

Commit 22d4e54

Browse files
committed
more preload in download
1 parent 5ee0164 commit 22d4e54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,12 @@ module.exports = class Hyperdrive extends ReadyResource {
457457
return
458458
}
459459

460+
// first preload the list so we can use the full power afterwards to actually preload everything
461+
// eslint-disable-next-line
462+
for await (const _ of this.list(folder, opts)) {
463+
// ignore
464+
}
465+
460466
for await (const entry of this.list(folder, opts)) {
461467
const b = entry.value.blob
462468
if (!b) continue

0 commit comments

Comments
 (0)