Skip to content

Reading a file name with null bytes fails, but has no err.code #517

@domenic

Description

@domenic

As reported in jsdom/jsdom#1003, if you do fs.readFile("<div>\0</div>", "utf-8", function (err) { }) then err will only be detectable via err.toString() == 'Error: Path must be a string without null bytes.'. Having a .code would be better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions