Fix decaf error in FSPersistorManager

This commit is contained in:
Simon Detheridge 2019-12-16 11:16:37 +00:00
parent 0b6e725137
commit e06c03e536

View file

@ -82,12 +82,12 @@ module.exports = {
{ err, location, filteredName: name }, { err, location, filteredName: name },
'Error reading from file' 'Error reading from file'
) )
}
if (err.code === 'ENOENT') { if (err.code === 'ENOENT') {
return callback(new Errors.NotFoundError(err.message), null) return callback(new Errors.NotFoundError(err.message), null)
} else { } else {
return callback(err, null) return callback(err, null)
} }
}
opts.fd = fd opts.fd = fd
const sourceStream = fs.createReadStream(null, opts) const sourceStream = fs.createReadStream(null, opts)
return callback(null, sourceStream) return callback(null, sourceStream)