Prevent default template from trying to copy its static files into themselves if env.dirname contains a backslash. Otherwise they end up empty.

Filenames provided by fs.ls already use slashes instead of backslashes so the replace(fromDir, toDir) does nothing and the file is truncated. (Issue #190)
This commit is contained in:
Frank Steidinger 2012-09-20 12:35:27 +02:00
parent 20f8709463
commit 132a6da310

View File

@ -237,7 +237,7 @@ exports.publish = function(taffyData, opts, tutorials) {
fs.mkPath(outdir);
// copy static files to outdir
var fromDir = env.dirname + '/' + templatePath + '/static',
var fromDir = env.dirname.replace(/\\/g, "/") + '/' + templatePath + '/static',
staticFiles = fs.ls(fromDir, 3);
staticFiles.forEach(function(fileName) {