mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
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:
parent
20f8709463
commit
132a6da310
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user