Browse Source

Haxe 4 eval will return the main class's path as programPath (#293)

Valentin Lemière 8 years ago
parent
commit
f5b44bed8e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      hxd/fs/LocalFileSystem.hx

+ 3 - 1
hxd/fs/LocalFileSystem.hx

@@ -314,7 +314,9 @@ class LocalFileSystem implements FileSystem {
 		if( !StringTools.endsWith(baseDir, "/") ) baseDir += "/";
 		root = new LocalEntry(this, "root", null, froot);
 		#else
-		#if (haxe_ver >= 3.3)
+		#if (macro && haxe_ver >= 4.0)
+		var exePath = null;
+		#elseif (haxe_ver >= 3.3)
 		var pr = Sys.programPath();
 		var exePath = pr == null ? null : pr.split("\\").join("/").split("/");
 		#else