From 1c9c8b1a5a9d3d735cc5f15ad7114a39d0baf2ec Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Sun, 24 Jan 2016 12:02:43 -0500 Subject: [PATCH] Static copy was bailing on unlinking the directory, now just overcopies --- static.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/static.js b/static.js index 094f36f..ca422c5 100644 --- a/static.js +++ b/static.js @@ -19,18 +19,15 @@ 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.'); - ncp(config.staticSource, config.staticDest, function(err) { - if (!err) { - console.log(config.staticSource+' copied to '+config.staticDest); - callback(null); - } - else { - callback(err); - } - }); + console.log("Copying "+config.staticDest); + ncp(config.staticSource, config.staticDest, function(err) { + if (!err) { + console.log(config.staticSource+' copied to '+config.staticDest); + callback(null); + } + else { + callback(err); + } }); }