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 2c44706 commit e0054eeCopy full SHA for e0054ee
lib/internal/fs/promises.js
@@ -1175,15 +1175,8 @@ async function mkdtemp(prefix, options) {
1175
prefix = getValidatedPath(prefix, 'prefix');
1176
warnOnNonPortableTemplate(prefix);
1177
1178
- let path;
1179
- if (typeof prefix === 'string') {
1180
- path = `${prefix}XXXXXX`;
1181
- } else {
1182
- path = Buffer.concat([prefix, Buffer.from('XXXXXX')]);
1183
- }
1184
-
1185
return await PromisePrototypeThen(
1186
- binding.mkdtemp(path, options.encoding, kUsePromises),
+ binding.mkdtemp(prefix, options.encoding, kUsePromises),
1187
undefined,
1188
handleErrorFromBinding,
1189
);
0 commit comments