Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #47 from neonstalwart/path-join

fix pathModule.join to handle consecutive ../ segments
  • Loading branch information...
commit 53c3578088910fa3e95451a9f78d13fca053694e 2 parents 8dd7bc6 + e3c503c
@kriszyp authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 build.js
View
6 build.js
@@ -43,7 +43,7 @@ if(typeof define == 'undefined'){
define = pseudoDefine;
require('./core/parser');
}else{
- define(['build/fs', './build/base64'], function(fsModule, base64){
+ define(['build/fs', 'build/fileUtils', './build/base64'], function(fsModule, fileUtils, base64){
fs = fsModule;
base64Module = base64;
// must create our own path module for Rhino :/
@@ -76,9 +76,7 @@ if(typeof define == 'undefined'){
return parts.join('/');
},
join: function(base, target){
- return ((base[base.length - 1] == '/' ? base : (base + '/'))+ target)
- .replace(/\/[^\/]*\/\.\./g, '')
- .replace(/\/\./g,'');
+ return fileUtils.compactPath((base[base.length - 1] == '/' ? base : (base + '/')) + target);
}
};
return function(xstyleText){
Please sign in to comment.
Something went wrong with that request. Please try again.