Fix #30 Fix #31 use <mtime> instead of <ctime> which is more relevant

Also means we can use <touch> to force a file to rebuild, since touch changes <mtime>
pull/47/head
Romain 8 years ago
parent 315e08e0e5
commit eb95cc929c

@ -36,7 +36,7 @@ exports.update = function(opts, callback) {
next(null, {
absolute: absolute,
relative: filePath,
fileDate: Math.max(stats.ctime.getTime(), stats.mtime.getTime())
fileDate: stats.mtime.getTime()
});
});
}

@ -16,7 +16,7 @@ exports.exec = function(input, output, metadata, options, callback) {
});
var process = tasks.filter(function(task) {
try {
var destDate = fs.statSync(task.dest).ctime.getTime();
var destDate = fs.statSync(task.dest).mtime.getTime();
return task.metadata.fileDate > destDate;
} catch (ex) {
return true;

Loading…
Cancel
Save