Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs validatePath throws instead of calling error callback #29926

Closed
chrisbednarski opened this issue Oct 11, 2019 · 1 comment
Closed

fs validatePath throws instead of calling error callback #29926

chrisbednarski opened this issue Oct 11, 2019 · 1 comment
Labels
fs Issues and PRs related to the fs subsystem / file system. wontfix Issues that will not be fixed.

Comments

@chrisbednarski
Copy link

chrisbednarski commented Oct 11, 2019

  • 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

@bnoordhuis
Copy link
Member

See #18308, that change was introduced deliberately as a semver-major (i.e., backwards incompatible) change.

@bnoordhuis bnoordhuis added fs Issues and PRs related to the fs subsystem / file system. wontfix Issues that will not be fixed. labels Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. wontfix Issues that will not be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants