fs: mkdtemp should not fail if no callback passed#6828
fs: mkdtemp should not fail if no callback passed#6828thefourtheye wants to merge 2 commits intonodejs:masterfrom
Conversation
8235c32 to
66a5666
Compare
|
LGTM. On an unrelated note, how about moving the |
|
LGTM if CI is green |
49a7016 to
b50654d
Compare
|
@mscdex I moved them and changed |
|
@thefourtheye Looks better now. However you might make the code move a separate commit so that the callback change is more easily visible. |
b50654d to
0a87d37
Compare
|
@mscdex Oh yes. This is better now. Thanks :-) PTAL. |
lib/fs.js
Outdated
There was a problem hiding this comment.
minor nit: might change this to var callback to be consistent with the rest of fs. Also let in general is still slow IIRC, although whether that will matter in the grand scheme of things in this particular case is hard to say.
There was a problem hiding this comment.
@mscdex Sorry, I made a big mess out of this small change. PTAL now. I updated.
As it is, `fs.mkdtemp` crashes with a C++ assertion if the callback function is not passed. This patch uses `maybeCallback` to create one, if no callback function is passed.
0a87d37 to
daa3750
Compare
|
CI again just to be safe: https://ci.nodejs.org/job/node-test-pull-request/2690/ |
As it is, `fs.mkdtemp` crashes with a C++ assertion if the callback function is not passed. This patch uses `maybeCallback` to create one, if no callback function is passed. PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
As it is, `fs.mkdtemp` crashes with a C++ assertion if the callback function is not passed. This patch uses `maybeCallback` to create one, if no callback function is passed. PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
As it is, `fs.mkdtemp` crashes with a C++ assertion if the callback function is not passed. This patch uses `maybeCallback` to create one, if no callback function is passed. PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #6828 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
Affected core subsystem(s)
fs
Description of change
As it is,
fs.mkdtempcrashes with a C++ assertion if the callbackfunction is not passed. This patch uses
maybeCallbackto create one,if no callback function is passed.