Skip to content

ENOENT thrown when trying to create a file with an invalid filename #8987

Closed
@Daniel15

Description

@Daniel15

Node v6.7.0, Windows 10

To reproduce the issue:

fs.writeFileSync('C:\\temp\\foo:bar:baz', 'fail')

Expected output: Some error message about the filename being invalid because it contains colons

Actual output:

Error: ENOENT: no such file or directory, open 'C:\temp\foo:bar:baz'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.writeFileSync (fs.js:1333:33)
    at repl:1:4
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:96:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:313:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedPRs that are blocked by other issues or PRs.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