Closed
Description
- Version: 7.1.0 & 7.2.0
- Platform: OSX 10.9.5
- Subsystem: fs
I noted a change in behavior between fs.statSync when migrating between 7.1.0 and 7.2.0. With
7.1.0 the following code reports a file size of 0.
var fs = require('fs');
var buffer = new Buffer(16);
buffer.fill(0);
fd = fs.openSync('test', 'a');
fs.writeSync(fd, buffer);
fs.fsyncSync(fd);
fs.closeSync(fd);
var stats = fs.statSync('./test');
console.log(stats['size']);
fs.unlinkSync('test');
While using 7.2.0 it reports a file size of 16.
Interestingly using appendFileSync rather than opening file handles is not affected by version differences. The Changelog notes a libuv upgrade between the two versions but I'm unsure what could produce this change.