Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick Devine
9818af9763 fix extended tag names 2023-07-21 19:07:40 -07:00
Patrick Devine
b8421dce3d get the proper path for blobs to delete (#168) 2023-07-21 17:30:40 -07:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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
}
}

View File

@@ -45,7 +45,7 @@ func ParseModelPath(name string) ModelPath {
return ModelPath{}
}
colonParts := strings.Split(name, ":")
colonParts := strings.Split(slashParts[len(slashParts)-1], ":")
if len(colonParts) == 2 {
tag = colonParts[1]
} else {