Title: fs.mkdir is inconsistent in the number of arguments passed to the callback , when completed. · Issue #43015 · nodejs/node · GitHub
Open Graph Title: fs.mkdir is inconsistent in the number of arguments passed to the callback , when completed. · Issue #43015 · nodejs/node
X Title: fs.mkdir is inconsistent in the number of arguments passed to the callback , when completed. · Issue #43015 · nodejs/node
Description: Version 16.14 Platform Window/Linux Subsystem No response What steps will reproduce the bug? //call mkdir with to create a non existing directory and then when complete call it again with the same directory. fs.mkdir('c:\\temp\\testdirno...
Open Graph Description: Version 16.14 Platform Window/Linux Subsystem No response What steps will reproduce the bug? //call mkdir with to create a non existing directory and then when complete call it again with the same ...
X Description: Version 16.14 Platform Window/Linux Subsystem No response What steps will reproduce the bug? //call mkdir with to create a non existing directory and then when complete call it again with the same ...
Opengraph URL: https://github.com/nodejs/node/issues/43015
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fs.mkdir is inconsistent in the number of arguments passed to the callback , when completed.","articleBody":"### Version\r\n\r\n16.14\r\n\r\n### Platform\r\n\r\nWindow/Linux\r\n\r\n### Subsystem\r\n\r\n_No response_\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```js\r\n//call mkdir with to create a non existing directory and then when complete call it again with the same directory.\r\nfs.mkdir('c:\\\\temp\\\\testdirnonexist',{ recursive: true }, function(){\r\n console.log('first time', arguments.length); //result 2\r\n fs.mkdir('c:\\\\temp\\\\testdirnonexist',{ recursive: true }, function(){\r\n console.log('second time', arguments.length); //result 1\r\n });\r\n});\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nAlways\r\n\r\n### What is the expected behavior?\r\n\r\nAlways return the same number of arguments. \r\nThis is important for example when you pass an async waterfall callback to mkdir.\r\n\r\n### What do you see instead?\r\n\r\nif the directory exists only 1 arguments will be returned (error argument which is null)\r\nif directory is created then it returns null, and the path.\r\n\r\n\r\n### Additional information\r\n\r\n_No response_","author":{"url":"https://github.com/ryan65","@type":"Person","name":"ryan65"},"datePublished":"2022-05-09T09:39:20Z","url":"https://github.com/nodejs/node/issues/43015"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9ccbf5ae-c596-f9b8-aa18-f4de5b0773c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 972E:61DA5:48F17:600A9:6B017BA3 |
| html-safe-nonce | 16e869739aa20a870c1c9db090fd20df8cfc255f43d5a094532fcb2e4fbe8329 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzJFOjYxREE1OjQ4RjE3OjYwMEE5OjZCMDE3QkEzIiwidmlzaXRvcl9pZCI6Ijg5OTUzMjI5Mjg5MzM0NjkwOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4c5ade6af5cddf944fe32862d2fd6eb58fe35042ae2b1ed59f14f30a99e9bca9 |
| hovercard-subject-tag | issue:1229446542 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/43015/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de5e7082583144a01c37206317b309a737e87c978035e287ff0e98eda8090e21/nodejs/node/issues/43015 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de5e7082583144a01c37206317b309a737e87c978035e287ff0e98eda8090e21/nodejs/node/issues/43015 |
| og:image:alt | Version 16.14 Platform Window/Linux Subsystem No response What steps will reproduce the bug? //call mkdir with to create a non existing directory and then when complete call it again with the same ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ryan65 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width