修复安装问题

This commit is contained in:
2026-06-23 14:57:36 +08:00
parent a316932d3f
commit d8779ed5bf
3 changed files with 18 additions and 4 deletions
+6 -1
View File
@@ -78,8 +78,13 @@ func getDefaultSocketPath() string {
return ""
}
// LoadConfig reads the config file or creates one with defaults.
func LoadConfig() *Config {
// If customPath is non-empty, it overrides the OS-aware config file path.
func LoadConfig(customPath string) *Config {
configDir, configFile := getConfigPath()
if customPath != "" {
configFile = customPath
configDir = filepath.Dir(configFile)
}
defaultPath := getDefaultStoragePath()
// Check if config file exists; create with defaults if not.