-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
- Version: 10.0.0
- Platform: Debian 9
- Subsystem:
The documentation for fs.close states "No arguments other than a possible exception are given to the completion callback."
When used in conjunction with API's like async.waterfall, it is important that the callback is called with exactly one argument (err) because additional arguments are passed on to the next task.
I have found that in node 10.0.0 fs.close is invoking the callback with two arguments (err, undefined) here: https://github.com/nodejs/node/blob/v10.x/lib/fs.js#L506
I initially thought the issue might be due to recent changes in the makeCallback function, but that is not the case. The oncomplete handler is being called with a second undefined argument.
I see that there have been many changes to FSReqWrap in native land. Maybe the issue is in there somewhere?
I made this JS patch as a workaround: v10.x...digitalbazaar:v10.x
tracking: digitalbazaar/bedrock#25