Back to my style in flush

pull/2/head
Louis Chatriot 9 years ago
parent f916e69717
commit 6d1f9cf20f
  1. 7
      lib/storage.js

@ -59,13 +59,14 @@ storage.flushToStorage = function (options, callback) {
if (err) { return callback(err); }
fs.fsync(fd, function (errFS) {
fs.close(fd, function (errC) {
var e = null;
if (errFS || errC) {
e = new Error('Failed to flush to storage');
var e = new Error('Failed to flush to storage');
e.errorOnFsync = errFS;
e.errorOnClose = errC;
return callback(e);
} else {
return callback(null);
}
return callback(e);
});
});
});

Loading…
Cancel
Save