From 01f7caa3af530c33c2628ffd0fa79860bd82758e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 11 Feb 2014 10:57:51 -0500 Subject: [PATCH] Proper handling of windows path separators in plugin js gets --- src/meta.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/meta.js b/src/meta.js index 7f1e496de7..13a6c8f41c 100644 --- a/src/meta.js +++ b/src/meta.js @@ -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]) {