安装路径修复

This commit is contained in:
Yeomai committed 2026-10-18 19:38:47 +08:00
1 parent 5e024f77a2
commit 88e5707ab6
3 files changed
+65 -2

No files matched your search

+3 -2
View File
@@ -23,8 +23,9 @@ function runtimeRoot() {
}
function dataDirectory() {
const base = process.env.LOCALAPPDATA || app.getPath('userData')
return path.join(base, 'PicHost', 'data')
return app.isPackaged
? path.join(path.dirname(process.execPath), 'data')
: path.join(__dirname, '..', 'data')
}
function findFreePort() {