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,11 +82,11 @@ module.exports = {
{ err, 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
const sourceStream = fs.createReadStream(null, opts)