Skip to content

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

@GeorgianStan

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

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.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