Browse Source
server: add hint to the error message when model path access fails (#10843)
parth/deepseek-r1-tools
frob
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
server/modelpath.go
|
|
|
@ -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 |
|
|
|
|