Static copy was bailing on unlinking the directory, now just overcopies

This commit is contained in:
Andrew Davidson 2016-01-24 12:02:43 -05:00
parent 11fd6d9aa2
commit 1c9c8b1a5a

View file

@ -19,9 +19,7 @@ Post.prototype.set = function (name, value) {
}
Static.updateBuildFolder = function (callback) {
console.log("Removing "+config.staticDest);
fs.unlink(config.staticDest, function(err) {
console.log(config.staticDest+' deleted.');
console.log("Copying "+config.staticDest);
ncp(config.staticSource, config.staticDest, function(err) {
if (!err) {
console.log(config.staticSource+' copied to '+config.staticDest);
@ -31,7 +29,6 @@ Static.updateBuildFolder = function (callback) {
callback(err);
}
});
});
}
module.exports = Static;