Skip to content

fs validatePath throws instead of calling error callback #29926

Closed
@chrisbednarski

Description

@chrisbednarski
  • Version: 10.16.3, 12.11.1
  • Platform: Windows 64, 32-bit
  • Subsystem: fs (utils.js)

This is a regression from node 8.16.2

  const pathname = join(__dirname, "?\0"); // null character will fail validation
  let output = createWriteStream(pathname)
    .on("error", (error) => {
      // do something
  });

validatePath function throws an exception instead of calling error callback

In node 8, the callback was checked

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.wontfixIssues that will not be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions