mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-07-14 13:22:09 +08:00
fixed an issue that caused the program to crash if the item did not exist when opening the item.
This commit is contained in:
parent
d117397dc3
commit
e7ce285ae9
@ -318,11 +318,15 @@ function execute(
|
|||||||
// 工作目录
|
// 工作目录
|
||||||
let currentDir = startLocation;
|
let currentDir = startLocation;
|
||||||
if (!currentDir || currentDir.trim() === "") {
|
if (!currentDir || currentDir.trim() === "") {
|
||||||
let statRes = statSync(file);
|
try {
|
||||||
if (statRes.isDirectory()) {
|
let statRes = statSync(file);
|
||||||
currentDir = file;
|
if (statRes.isDirectory()) {
|
||||||
} else {
|
currentDir = file;
|
||||||
currentDir = dirname(file);
|
} else {
|
||||||
|
currentDir = dirname(file);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
currentDir = app.getPath("home");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 组装命令
|
// 组装命令
|
||||||
|
Loading…
Reference in New Issue
Block a user