Skip to content

Commit

Permalink
Fixed DOSee running CD app.exe.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Jun 17, 2021
1 parent 434f114 commit f8c5132
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/dosee-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ window.Module = null;
if (urlParams.get(`dosutils`) === `true`)
this.commandLine.push(loadConfig, `/dos/s/utils.con`);
// some programs don't run correctly unless the current active directory is root
// pop() removes the last element from path.
let executable = path.pop();
if (path && path.length) {
const newPath = path.toString().replace(`,`, `\\`);
console.log(`Execute path "${newPath}"`);
Expand All @@ -405,7 +407,6 @@ window.Module = null;
// automatically run the program executable
if (urlParams.get(`dosautorun`) === `false`) return;
// hack to implement program options
let executable = path.pop();
executable = executable.replace(` :`, ` /`);
this.verbose = `Will execute \`${executable}\` ${this.verbose}`;
this.commandLine.push(runCommand, executable);
Expand Down

0 comments on commit f8c5132

Please sign in to comment.