|
@@ -208,11 +208,9 @@ class Path {
|
|
If `path` is null, the result is unspecified.
|
|
If `path` is null, the result is unspecified.
|
|
**/
|
|
**/
|
|
public static function normalize(path : String) : String {
|
|
public static function normalize(path : String) : String {
|
|
- var slash = '/';
|
|
|
|
- path = path.split("\\").join("/");
|
|
|
|
- if( path == null || path == slash ) {
|
|
|
|
- return slash;
|
|
|
|
- }
|
|
|
|
|
|
+ var slash = "/";
|
|
|
|
+ path = path.split("\\").join(slash);
|
|
|
|
+ if (path == slash) return slash;
|
|
|
|
|
|
var target = [];
|
|
var target = [];
|
|
|
|
|
|
@@ -235,7 +233,7 @@ class Path {
|
|
case ":".code:
|
|
case ":".code:
|
|
acc.add(":");
|
|
acc.add(":");
|
|
colon = true;
|
|
colon = true;
|
|
- case "/".code if (colon == false):
|
|
|
|
|
|
+ case "/".code if (!colon):
|
|
slashes = true;
|
|
slashes = true;
|
|
case i:
|
|
case i:
|
|
colon = false;
|
|
colon = false;
|
|
@@ -246,8 +244,7 @@ class Path {
|
|
acc.add(String.fromCharCode(i));
|
|
acc.add(String.fromCharCode(i));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- var result = acc.toString();
|
|
|
|
- return result;
|
|
|
|
|
|
+ return acc.toString();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|