fix: couldn't correctly zip growing files, like logs https://github.com/rejetto/hfs/issues/70
Massimo Melina committed
Aug 8, 2022 at 16:50 UTC
bf03f5a405024bc16131d0dd41adcd7ccab5e53b
1 file changed
+1
-1
server/src/zip.ts
+1
-1
@@ -47,7 +47,7 @@ export async function zipStreamFromFolder(node: VfsNode, ctx: Koa.Context) {
47
ts: st.mtime || st.ctime,
48
mode: st.mode,
49
sourcePath: source,
50
- getData: () => createReadStream(source)
50
+ getData: () => createReadStream(source, { start: 0 , end: st.size-1 })
51
}
52
}
53
catch {}