mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-07 23:23:26 +00: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:
parent
330ba41dd6
commit
c5e1584fcc
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue