瀏覽代碼

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 {
 	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);
 			haxe.io.Path.addTrailingSlash(path);
 		} else {
 		} else {
 			haxe.io.Path.removeTrailingSlashes(path);
 			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 {
 	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);
 			haxe.io.Path.addTrailingSlash(path);
 		} else {
 		} else {
 			haxe.io.Path.removeTrailingSlashes(path);
 			haxe.io.Path.removeTrailingSlashes(path);