修复 配置文件不生效问题

This commit is contained in:
Chen committed 2025-12-04 18:49:04 +08:00
1 parent 767ac54992
commit c215de731e
2 files changed
+17 -3

No files matched your search

+7 -2
View File
@@ -13,16 +13,21 @@ const CONFIG_CACHE_TTL = 5000; // 5秒缓存
function getConfigDir() {
// Check if running on fnOS
if (process.env.TRIM_PKGVAR) {
console.log('📁 配置目录 (fnOS): ' + process.env.TRIM_PKGVAR);
return process.env.TRIM_PKGVAR;
}
// Windows
if (process.platform === 'win32') {
return path.join(process.env.APPDATA || os.homedir(), 'FlyPic');
const dir = path.join(process.env.APPDATA || os.homedir(), 'FlyPic');
console.log('📁 配置目录 (Windows): ' + dir);
return dir;
}
// Linux/Mac
return path.join(os.homedir(), '.flypic');
const dir = path.join(os.homedir(), '.flypic');
console.log('📁 配置目录 (Linux/Mac): ' + dir);
return dir;
}
/**