فهرست منبع

fix paths in sys.Filesystem again

Simon Krajewski 10 سال پیش
والد
کامیت
2376e208cd
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      std/cpp/_std/sys/FileSystem.hx
  2. 1 1
      std/neko/_std/sys/FileSystem.hx

+ 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);