fix: zip feature could sometimes generate ERR_OUT_OF_RANGE error

Massimo Melina committed May 7, 2022 at 15:05 UTC bbff3eeb65cfb18f3dbfcb51e1d1963e6197b04f
2 files changed +5 -3
server/src/QuickZipStream.ts
+3 -3
@@ -2,13 +2,13 @@
2
3 import { Readable } from 'stream'
4 // @ts-ignore
5 -import { crc32number } from 'buffer-crc32'
5 +import { crc32 as crc32lib } from 'buffer-crc32'
6
7 const ZIP64_LIMIT = 2**31 -1
8
9 const crc32provider = import('@node-rs/crc32').then(lib => lib.crc32, () => {
10 - console.debug('using generic lib for crc32')
11 - return crc32number
10 + console.log('using generic lib for crc32')
11 + return crc32lib.unsigned
12 })
13
14 interface ZipSource {
todo.md
+2
@@ -1,4 +1,5 @@
1 # To do
2 +- admin/fs: sort items
3 - plugin.api.subscribeConfig
4 - watch certificates for change
5 - admin/fs: render virtual folders differently
@@ -21,6 +22,7 @@
22 - log filter option
23 - log filter plugin
24 - admin: improve masks editor
25 +- admin: warn before changing page if we have unsaved changes
26 - publish to npm (so people can "npm install hfs")
27 - frontend search supporting masks
28 - use dialogs instead of side-forms on mobile (admin/fs+accounts)