AvianFlu / ncp

Asynchronous recursive file copying with Node.js.
MIT License
681 stars 103 forks source link

Callback fired before all files are copied #90

Closed fleg closed 9 years ago

fleg commented 9 years ago

Looks like callback fired before all files are copied

console.log(fs.readdirSync(argv["from"]));

ncp(argv["from"], argv["to"], function(err) {
    if(err) { throw err; }

    console.log(fs.readdirSync(argv["to"]));
});

here is output (nw.js v0.12.0) out

p.s. recursive copy from fs-extra work like a charm

fleg commented 9 years ago

75