mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
server: replace blob prefix separator from ':' to '-' (#3146)
This fixes issues with blob file names that contain ':' characters to be rejected by file systems that do not support them.
This commit is contained in:
parent
6459377ae0
commit
703684a82a
6 changed files with 120 additions and 13 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -150,10 +149,7 @@ func GetBlobsPath(digest string) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
digest = strings.ReplaceAll(digest, ":", "-")
|
||||
}
|
||||
|
||||
digest = strings.ReplaceAll(digest, ":", "-")
|
||||
path := filepath.Join(dir, "blobs", digest)
|
||||
dirPath := filepath.Dir(path)
|
||||
if digest == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue