Explorar el Código

Revert "[cpp] [neko] do not remove trailing slashes from absolute path (see #3266)"

This reverts commit 1684bf8c1022c8727c53bd57b9b67e7538799580.
Simon Krajewski hace 10 años
padre
commit
091abbf2e3
Se han modificado 2 ficheros con 2 adiciones y 8 borrados
  1. 1 4
      std/cpp/_std/sys/FileSystem.hx
  2. 1 4
      std/neko/_std/sys/FileSystem.hx

+ 1 - 4
std/cpp/_std/sys/FileSystem.hx

@@ -59,10 +59,7 @@ class FileSystem {
 	}
 
 	static function kind( path : String ) : FileKind {
-		if (!haxe.io.Path.isAbsolute(path)) {
-			path = haxe.io.Path.removeTrailingSlashes(path);
-		}
-		var k:String = sys_file_type(path);
+		var k:String = sys_file_type(haxe.io.Path.removeTrailingSlashes(path));
 		return switch(k) {
 		case "file": kfile;
 		case "dir": kdir;

+ 1 - 4
std/neko/_std/sys/FileSystem.hx

@@ -56,10 +56,7 @@ class FileSystem {
 	}
 
 	static function kind( path : String ) : FileKind {
-		if (!haxe.io.Path.isAbsolute(path)) {
-			path = haxe.io.Path.removeTrailingSlashes(path);
-		}
-		var k = new String(sys_file_type(untyped path.__s));
+		var k = new String(sys_file_type(untyped (haxe.io.Path.removeTrailingSlashes(path)).__s));
 		return switch(k) {
 		case "file": kfile;
 		case "dir": kdir;