mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-18 14:42:16 +00:00
Update main.js
This commit is contained in:
parent
642eb2f417
commit
cc64b6969f
@ -187,7 +187,7 @@ app.whenReady().then(() => {
|
|||||||
|
|
||||||
// Store file argument but don't open immediately
|
// Store file argument but don't open immediately
|
||||||
const args = process.argv.slice(1);
|
const args = process.argv.slice(1);
|
||||||
const fileArg = args.find(arg => !arg.startsWith('-') && !arg.includes('electron'));
|
const fileArg = args.find(isValidFileArg); // Use the filtering function
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (fileArg) openFileSafely(fileArg); // ✅ Open only after window is ready
|
if (fileArg) openFileSafely(fileArg); // ✅ Open only after window is ready
|
||||||
|
Loading…
Reference in New Issue
Block a user