Explorar o código

remove redundant lines

Christopher Kaster %!s(int64=11) %!d(string=hai) anos
pai
achega
9dc69f2caf
Modificáronse 1 ficheiros con 2 adicións e 12 borrados
  1. 2 12
      std/haxe/io/Path.hx

+ 2 - 12
std/haxe/io/Path.hx

@@ -184,20 +184,11 @@ class Path {
 	}
 
 	/**
-		Normalize a given `path` (e.g. make '/your/fancy/../path' to '/your/path')
+		Normalize a given `path` (e.g. make '/usr/local/../lib' to '/usr/lib')
 	**/
-	public static function normalize( path : String, ?forceSlash : Bool = false ) : String {
+	public static function normalize( path : String) : String {
 		var slash = '/';
 
-		if( this.backslash && !forceSlash ) {
-			slash = '\\';
-		}
-
-		if( forceSlash ) {
-			// replace backslashes
-			path = StringUtils.replace(path, '\\', '/');
-		}
-
 		if( path == null || path == slash ) {
 			return slash;
 		}
@@ -230,7 +221,6 @@ class Path {
 		return (prependSlash ? slash : '') + result;
 	}
 
-
 	/**
 		Adds a trailing slash to `path`, if it does not have one already.