Sfoglia il codice sorgente

create manifests directory

Michael Yang 1 anno fa
parent
commit
a1ecdd36d5
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      server/modelpath.go

+ 6 - 1
server/modelpath.go

@@ -114,7 +114,12 @@ func GetManifestPath() (string, error) {
 		return "", err
 	}
 
-	return filepath.Join(home, ".ollama", "models", "manifests"), nil
+	path := filepath.Join(home, ".ollama", "models", "manifests")
+	if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
+		return "", err
+	}
+
+	return path, nil
 }
 
 func GetBlobsPath(digest string) (string, error) {