We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf6aa53 commit 490f15aCopy full SHA for 490f15a
lib/internal/fs/promises.js
@@ -1179,15 +1179,8 @@ async function mkdtemp(prefix, options) {
1179
prefix = getValidatedPath(prefix, 'prefix');
1180
warnOnNonPortableTemplate(prefix);
1181
1182
- let path;
1183
- if (typeof prefix === 'string') {
1184
- path = `${prefix}XXXXXX`;
1185
- } else {
1186
- path = Buffer.concat([prefix, Buffer.from('XXXXXX')]);
1187
- }
1188
-
1189
return await PromisePrototypeThen(
1190
- binding.mkdtemp(path, options.encoding, kUsePromises),
+ binding.mkdtemp(prefix, options.encoding, kUsePromises),
1191
undefined,
1192
handleErrorFromBinding,
1193
);
0 commit comments