GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: ensure consistency for mkdtemp in both fs and fs/promises · nodejs/node@490f15a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/fs
    • promises.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/fs/promises.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,15 +1179,8 @@ async function mkdtemp(prefix, options) {
11791179
prefix = getValidatedPath(prefix, 'prefix');
11801180
warnOnNonPortableTemplate(prefix);
11811181

1182-
let path;
1183-
if (typeof prefix === 'string') {
1184-
path = `${prefix}XXXXXX`;
1185-
} else {
1186-
path = Buffer.concat([prefix, Buffer.from('XXXXXX')]);
1187-
}
1188-
11891182
return await PromisePrototypeThen(
1190-
binding.mkdtemp(path, options.encoding, kUsePromises),
1183+
binding.mkdtemp(prefix, options.encoding, kUsePromises),
11911184
undefined,
11921185
handleErrorFromBinding,
11931186
);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.