Skip to content

fs.mkdir with recursive option and invalid name hangs the program #36490

Description

@GeorgianStan
  • Version: v12.18.0
  • Platform: Windows10
  • Subsystem:

What steps will reproduce the bug?

const fs = require("fs");
const path = "./to-delete/s:d";

fs.mkdir(path, { recursive: true }, (err) => {
  if (err) {
    console.log(err);
    return;
  }
  console.log("success");
});

How often does it reproduce? Is there a required condition?

Using : (double dots) character in folder name after the first prefix will make the program freeze

What is the expected behavior?

Throw an error

What do you see instead?

The program hangs

Additional information

--

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions