create file if reading and not exist
Signed-off-by: AlienTornadosaurusHex <>
This commit is contained in:
parent
2e96df3b7f
commit
2623117f17
2 changed files with 1 additions and 3 deletions
|
@ -7,7 +7,7 @@ import networkConfig from '../../networkConfig'
|
|||
export function download({ name, directory }) {
|
||||
const path = `${directory}${name}.gz`.toLowerCase()
|
||||
|
||||
const data = fs.readFileSync(path)
|
||||
const data = fs.readFileSync(path, { flag: 'as+' })
|
||||
const content = zlib.inflateSync(data)
|
||||
|
||||
return content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue