Static copy was bailing on unlinking the directory, now just overcopies
This commit is contained in:
parent
11fd6d9aa2
commit
1c9c8b1a5a
1 changed files with 9 additions and 12 deletions
21
static.js
21
static.js
|
@ -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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue