summaryrefslogtreecommitdiff
path: root/platform/javascript/engine.js
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/engine.js')
-rw-r--r--platform/javascript/engine.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js
index 1f78aa672d..227accadb0 100644
--- a/platform/javascript/engine.js
+++ b/platform/javascript/engine.js
@@ -134,12 +134,10 @@
this.startGame = function(execName, mainPack) {
executableName = execName;
- var mainArgs = [ '--main-pack', mainPack ];
+ var mainArgs = [ '--main-pack', getPathLeaf(mainPack) ];
return Promise.all([
- // Load from directory,
- this.init(getBasePath(mainPack)),
- // ...but write to root where the engine expects it.
+ this.init(getBasePath(execName)),
this.preloadFile(mainPack, getPathLeaf(mainPack))
]).then(
Function.prototype.apply.bind(synchronousStart, this, mainArgs)