mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
Harden config storage and fix concurrency/install checks
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user