Procházet zdrojové kódy

fix paths in sys.Filesystem again

Simon Krajewski před 10 roky
rodič
revize
2376e208cd

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

@@ -104,7 +104,7 @@ class FileSystem {
 	}
 
 	private static inline function makeCompatiblePath(path:String):String {
-		return if (path.charCodeAt(1) == ":".code) {
+		return if (path.charCodeAt(1) == ":".code && path.length <= 3) {
 			haxe.io.Path.addTrailingSlash(path);
 		} else {
 			haxe.io.Path.removeTrailingSlashes(path);

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

@@ -105,7 +105,7 @@ class FileSystem {
 	}
 
 	private static inline function makeCompatiblePath(path:String):String {
-		return if (path.charCodeAt(1) == ":".code) {
+		return if (path.charCodeAt(1) == ":".code && path.length <= 3) {
 			haxe.io.Path.addTrailingSlash(path);
 		} else {
 			haxe.io.Path.removeTrailingSlashes(path);