File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -800,17 +800,19 @@ class ElectronLoader {
800800 _event ,
801801 /** @type {import("./app/models/app-message").AppMessageData<"profile:runGameAction"> } */ { profile, gameAction }
802802 ) => {
803+ profile . gameRootDir = this . #expandPath( profile . gameRootDir ) ;
804+
803805 // If game binary path is relative, use the `gameRootDir` as the binary dir
804806 if ( ! path . isAbsolute ( profile . gameBinaryPath ) ) {
805- profile . gameBinaryPath = path . join ( profile . gameRootDir , profile . gameBinaryPath ) ;
807+ profile . gameBinaryPath = path . join ( profile . gameRootDir , this . #expandPath ( profile . gameBinaryPath ) ) ;
806808 }
807809
808810 // Substitute variables for profile
809811 const gameActionCmd = _ . template ( gameAction . actionScript ) ( profile ) ;
810812
811813 // Run the action
812814 try {
813- exec ( gameActionCmd , { cwd : profile . gameBinaryPath } ) ;
815+ exec ( gameActionCmd , { cwd : profile . gameRootDir } ) ;
814816 } catch ( error ) {
815817 throw new Error ( error . toString ( ) ) ;
816818 }
You can’t perform that action at this time.
0 commit comments