Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Fix "More than one file selected" with "Open with"
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysdz committed Feb 22, 2019
1 parent aa8ce39 commit fee1a02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ function createWindow () {
function windowClosedOpenFile(e, p){
e.preventDefault();
if(process.argv[1] === "." || process.argv[1] === "./" || process.argv[1] === ".\\"){ // if run from CLI (`electron .` or `electron ./`)
process.argv.splice(2);
process.argv[2] = p;
} else {
process.argv.splice(1);
process.argv[1] = p;
}
createWindow();
Expand Down

0 comments on commit fee1a02

Please sign in to comment.