From 8080830253c9636010abb4a282d02a734981a52b Mon Sep 17 00:00:00 2001 From: lildemon Date: Mon, 12 Jan 2015 16:32:14 +0800 Subject: [PATCH] Failed to detect root path under windows --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 42bea3f..fdeefab 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports = function(content, file, conf){ opts.include_paths.unshift( file.dirname ); opts.include_paths = opts.include_paths.map(function( dir ) { - if (dir[0] !== '/') { + if (path.resolve( dir ) != path.normalize( dir )) { dir = path.join(root, dir); } return path.resolve( dir ); @@ -34,4 +34,4 @@ module.exports = function(content, file, conf){ // return sass.renderSync(opts); return compile( content, file, opts ); -}; \ No newline at end of file +};