We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa0fde7 commit 42fd640Copy full SHA for 42fd640
lib/internal/fs/promises.js
@@ -1176,15 +1176,8 @@ async function mkdtemp(prefix, options) {
1176
prefix = getValidatedPath(prefix, 'prefix');
1177
warnOnNonPortableTemplate(prefix);
1178
1179
- let path;
1180
- if (typeof prefix === 'string') {
1181
- path = `${prefix}XXXXXX`;
1182
- } else {
1183
- path = Buffer.concat([prefix, Buffer.from('XXXXXX')]);
1184
- }
1185
-
1186
return await PromisePrototypeThen(
1187
- binding.mkdtemp(path, options.encoding, kUsePromises),
+ binding.mkdtemp(prefix, options.encoding, kUsePromises),
1188
undefined,
1189
handleErrorFromBinding,
1190
);
0 commit comments