mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-08 03:30:23 +08:00
🎨 Improve electron-related conf dir https://github.com/siyuan-note/siyuan/issues/13150
This commit is contained in:
parent
6437ec9793
commit
2acdad6ee4
@ -48,6 +48,9 @@ let resetWindowStateOnRestart = false;
|
|||||||
|
|
||||||
remote.initialize();
|
remote.initialize();
|
||||||
|
|
||||||
|
app.setPath("userData", app.getPath("userData") + "-Electron"); // `~/.config` 下 Electron 相关文件夹名称改为 `SiYuan-Electron` https://github.com/siyuan-note/siyuan/issues/3349
|
||||||
|
fs.rmdirSync(app.getPath("appData") + "/" + app.name, {recursive: true}); // 删除自动创建的应用目录 https://github.com/siyuan-note/siyuan/issues/13150
|
||||||
|
|
||||||
if (!app.requestSingleInstanceLock()) {
|
if (!app.requestSingleInstanceLock()) {
|
||||||
app.quit();
|
app.quit();
|
||||||
return;
|
return;
|
||||||
@ -621,7 +624,6 @@ const initKernel = (workspace, port, lang) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
app.setAsDefaultProtocolClient("siyuan");
|
app.setAsDefaultProtocolClient("siyuan");
|
||||||
app.setPath("userData", app.getPath("userData") + "-Electron"); // `~/.config` 下 Electron 相关文件夹名称改为 `SiYuan-Electron` https://github.com/siyuan-note/siyuan/issues/3349
|
|
||||||
|
|
||||||
app.commandLine.appendSwitch("disable-web-security");
|
app.commandLine.appendSwitch("disable-web-security");
|
||||||
app.commandLine.appendSwitch("auto-detect", "false");
|
app.commandLine.appendSwitch("auto-detect", "false");
|
||||||
|
Loading…
Reference in New Issue
Block a user