Proper handling of windows path separators in plugin js gets

This commit is contained in:
Julian Lam
2014-02-11 10:57:51 -05:00
parent 6d1ec8c7fe
commit 01f7caa3af

View File

@@ -247,8 +247,10 @@ var fs = require('fs'),
plugins.fireHook('filter:scripts.get', this.scripts, function(err, scripts) {
var mtime,
jsPaths = scripts.map(function (jsPath) {
jsPath = path.normalize(jsPath);
if (jsPath.substring(0, 7) === 'plugins') {
var paths = jsPath.split('/'),
var paths = jsPath.split(path.sep),
mappedPath = paths[1];
if (plugins.staticDirs[mappedPath]) {