Harden config storage and fix concurrency/install checks

This commit is contained in:
jahruz67
2026-05-14 19:40:09 -07:00
parent f111695a45
commit ccf4d6184c
3 changed files with 13 additions and 7 deletions
+6 -2
View File
@@ -74,7 +74,12 @@ func (m *Manager) IsInstalled() bool {
return false
}
modelPath := filepath.Join(m.installDir, Models[info.Model].Filename)
modelInfo, ok := Models[info.Model]
if !ok || modelInfo.Filename == "" {
return false
}
modelPath := filepath.Join(m.installDir, modelInfo.Filename)
if _, err := os.Stat(modelPath); os.IsNotExist(err) {
return false
}
@@ -445,4 +450,3 @@ func downloadFile(url, dest string, progress chan<- DownloadProgress) error {
return nil
}