修改缓存文件夹位置

This commit is contained in:
2025-08-25 14:36:15 +08:00
parent f34600f4a8
commit 22e225848e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ class CacheConfigManager {
// 在打包环境中,使用可执行文件所在目录
this.configPath = path.join(process.cwd(), 'data', 'cache-config.json');
} else {
// 在开发环境中,使用相对路径
this.configPath = path.join(__dirname, 'cache-config.json');
// 在开发环境中,使用项目根目录的data文件夹
this.configPath = path.join(__dirname, '..', '..', 'data', 'cache-config.json');
}
// 确保路径是绝对路径