'use strict';

var through2 = require('through2');
var fs = require('graceful-fs');

function getStats() {
  return through2.obj(fetchStats);
}

function fetchStats(file, enc, cb) {
  fs.stat(file.path, function (err, stat) {
    if (stat) {
      file.stat = stat;
    }
    cb(err, file);
  });
}

module.exports = getStats;

'use strict';

var through2 = require('through2');
var fs = require('graceful-fs');

function getStats() {
  return through2.obj(fetchStats);
}

function fetchStats(file, enc, cb) {
  fs.lstat(file.path, function (err, stat) {
    if (stat) {
      file.stat = stat;
    }
    cb(err, file);
  });
}

module.exports = getStats;

Replace `fs.stat` call with `fs.lstat`
Update: Replace `fs.stat` call with `fs.lstat`
