mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-21 23:54:26 +08:00
[🛠️ Fix] Emergency fix for invalid config read logic
1. [/] 紧急修复了上个 commit 中引入的错误路径获取逻辑
This commit is contained in:
@@ -69,7 +69,7 @@ const deepMerge = (target, source) => {
|
||||
|
||||
class ConfigManager {
|
||||
constructor() {
|
||||
this.configDir = path.join(global.__HUGO_AURA__.logDir, "..");
|
||||
this.configDir = global.__HUGO_AURA__.auraDir;
|
||||
this.configPath = path.join(this.configDir, "config.json");
|
||||
this.encConfigPath = path.join(this.configDir, ".cache_2eafc8d0.dat"); // (雾
|
||||
/* ↑ 不使用 .tmp 扩展名, 不然容易真被清理了 */
|
||||
@@ -99,6 +99,7 @@ class ConfigManager {
|
||||
if (this.configDir === path.join(os.homedir(), "Documents", "HugoAura")) {
|
||||
return;
|
||||
}
|
||||
|
||||
const oldConfigPath = path.join(
|
||||
os.homedir(),
|
||||
"Documents",
|
||||
@@ -111,6 +112,7 @@ class ConfigManager {
|
||||
"HugoAura",
|
||||
".cache_2eafc8d0.dat"
|
||||
);
|
||||
|
||||
if (fs.existsSync(oldConfigPath)) {
|
||||
fs.copyFileSync(oldConfigPath, this.configPath);
|
||||
fs.unlinkSync(oldConfigPath);
|
||||
|
||||
Reference in New Issue
Block a user