Skip to content

createWriteStream; close doesn't finish writing all data to file #5631

@d3x0r

Description

@d3x0r

Windows 7/10,
node 5.6.0, and latest builds...
This seems like something fairly critical...

"use strict";

const fs = require( 'fs' );
var outData = fs.createWriteStream( "output.txt" );
outData.write( "line one" );
outData.write( "line two" );
outData.close();

results in a file that only has 'line one' in it.
it can be several lines... I'm often missing 5 lines in this one file... but basically every file never writes all information to the file.

this might be similar to #2314

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.questionIssues that look for answers.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions