mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
[FSPersistorManager] fix the stream opening for node10+
Attaching a `readable` listener causes the stream to hang otherwise. Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
committed by
Simon Detheridge
parent
330ba41dd6
commit
c5e1584fcc
@@ -48,10 +48,10 @@ module.exports =
|
||||
fs.open "#{location}/#{filteredName}", 'r', (err, fd) ->
|
||||
if err?
|
||||
logger.err err:err, location:location, filteredName:name, "Error reading from file"
|
||||
if err.code == 'ENOENT'
|
||||
return callback new Errors.NotFoundError(err.message), null
|
||||
else
|
||||
return callback err, null
|
||||
if err.code == 'ENOENT'
|
||||
return callback new Errors.NotFoundError(err.message), null
|
||||
else
|
||||
return callback err, null
|
||||
opts.fd = fd
|
||||
sourceStream = fs.createReadStream null, opts
|
||||
return callback null, sourceStream
|
||||
|
||||
Reference in New Issue
Block a user