mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 00:27:15 +01:00
server: add hint to the error message when model path access fails (#10843)
This commit is contained in:
@@ -116,7 +116,7 @@ func (mp ModelPath) BaseURL() *url.URL {
|
||||
func GetManifestPath() (string, error) {
|
||||
path := filepath.Join(envconfig.Models(), "manifests")
|
||||
if err := os.MkdirAll(path, 0o755); err != nil {
|
||||
return "", err
|
||||
return "", fmt.Errorf("%w: ensure path elements are traversable", err)
|
||||
}
|
||||
|
||||
return path, nil
|
||||
@@ -139,7 +139,7 @@ func GetBlobsPath(digest string) (string, error) {
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(dirPath, 0o755); err != nil {
|
||||
return "", err
|
||||
return "", fmt.Errorf("%w: ensure path elements are traversable", err)
|
||||
}
|
||||
|
||||
return path, nil
|
||||
|
||||
Reference in New Issue
Block a user