Feature(custom): ensure dir exist before open

This commit is contained in:
Kuingsmile
2026-01-27 16:56:13 +08:00
parent cc1236d4b5
commit 77f130311e

View File

@@ -185,9 +185,10 @@ export default [
if (inStorePath) { if (inStorePath) {
dirPath = path.join(STORE_PATH, dirPath || '') dirPath = path.join(STORE_PATH, dirPath || '')
} }
if (!dirPath || !fs.existsSync(dirPath)) { if (!dirPath) {
return return
} }
fs.ensureDirSync(dirPath)
shell.openPath(dirPath) shell.openPath(dirPath)
}, },
}, },