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,18 +19,15 @@ Post.prototype.set = function (name, value) {
} }
Static.updateBuildFolder = function (callback) { Static.updateBuildFolder = function (callback) {
console.log("Removing "+config.staticDest); console.log("Copying "+config.staticDest);
fs.unlink(config.staticDest, function(err) { ncp(config.staticSource, config.staticDest, function(err) {
console.log(config.staticDest+' deleted.'); if (!err) {
ncp(config.staticSource, config.staticDest, function(err) { console.log(config.staticSource+' copied to '+config.staticDest);
if (!err) { callback(null);
console.log(config.staticSource+' copied to '+config.staticDest); }
callback(null); else {
} callback(err);
else { }
callback(err);
}
});
}); });
} }