Procházet zdrojové kódy

Merge pull request #36165 from Relintai/fix_engine_startgame

Fix startGame's logic in engine.js.
Rémi Verschelde před 5 roky
rodič
revize
3adf2c8112
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. 2 4
      platform/javascript/engine.js

+ 2 - 4
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)