mirror of
https://github.com/ollama/ollama.git
synced 2025-03-26 09:42:10 +01:00
get the proper path for blobs to delete (#168)
This commit is contained in:
parent
9f6e97865c
commit
b8421dce3d
@ -548,9 +548,13 @@ func DeleteModel(name string, fn func(api.ProgressResponse)) error {
|
||||
// only delete the files which are still in the deleteMap
|
||||
for k, v := range deleteMap {
|
||||
if v {
|
||||
err := os.Remove(k)
|
||||
fp, err := GetBlobsPath(k)
|
||||
if err != nil {
|
||||
log.Printf("couldn't remove file '%s': %v", k, err)
|
||||
log.Printf("couldn't get file path for '%s': %v", k, err)
|
||||
continue
|
||||
}
|
||||
if err := os.Remove(fp); err != nil {
|
||||
log.Printf("couldn't remove file '%s': %v", fp, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user