Skip to content

Commit

Permalink
Fixes root output path collision detection on Windows, by @sintaxi
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethormandy committed Sep 10, 2014
1 parent 49f4d6d commit bbe7141
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,13 @@ exports.cssError = function(error){
*/

var willCollide = exports.willCollide = function(projectPath, outputPath){
console.log('will collide: ', projectPath, outputPath);


var projectPath = path.resolve(projectPath)
var outputPath = path.resolve(outputPath)
var relativePath = path.relative(projectPath, outputPath)
var arr = relativePath.split("/")
var arr = relativePath.split(path.sep)
var result = true;

arr.forEach(function(i){
Expand All @@ -228,7 +231,7 @@ var willCollide = exports.willCollide = function(projectPath, outputPath){
/**
* for @kennethormandy ;)
*/
if (outputPath == "/") result = true
if (outputPath == path.sep) result = true

return result
}
Expand Down

0 comments on commit bbe7141

Please sign in to comment.