Explorar el Código

fixed relDir calculus

ncannasse hace 6 años
padre
commit
f1aa5d332d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      other/haxelib/Run.hx

+ 2 - 2
other/haxelib/Run.hx

@@ -41,10 +41,10 @@ class Build {
 				targetDir += "/";
 			var targetAbs = sys.FileSystem.absolutePath(targetDir);
 			var currentAbs = sys.FileSystem.absolutePath(this.targetDir);
-			if( !StringTools.startsWith(currentAbs, targetAbs) )
+			if( !StringTools.startsWith(currentAbs, targetAbs+"/") )
 				relDir = currentAbs+"/"; // absolute
 			else 
-				relDir = currentAbs.substr(targetAbs.length);
+				relDir = currentAbs.substr(targetAbs.length+1);
 			relDir = relDir.split("\\").join("/");
 		}
 		if( !sys.FileSystem.exists(srcDir) ) {