Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Commit

Permalink
Better working directory behavior for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Jan 23, 2014
1 parent 9a65c00 commit 0a995cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/haxe/ApplicationMain.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ class ApplicationMain {
var currentPath = haxe.io.Path.directory (Sys.executablePath ());
Sys.setCwd (currentPath);

} catch (e:Dynamic) {}
#elseif linux
try {

if (!sys.FileSystem.exists (Sys.getCwd () + "/lime.ndll")) {

Sys.setCwd (haxe.io.Path.directory (Sys.executablePath ()));

}

} catch (e:Dynamic) {}
#end

Expand Down

0 comments on commit 0a995cc

Please sign in to comment.