mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 08:17:03 +00:00
resolve FROM path before sending modelfile (#1211)
This commit is contained in:
@@ -82,6 +82,10 @@ func CreateHandler(cmd *cobra.Command, args []string) error {
|
|||||||
path = filepath.Join(home, path[2:])
|
path = filepath.Join(home, path[2:])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !filepath.IsAbs(path) {
|
||||||
|
path = filepath.Join(filepath.Dir(filename), path)
|
||||||
|
}
|
||||||
|
|
||||||
bin, err := os.Open(path)
|
bin, err := os.Open(path)
|
||||||
if errors.Is(err, os.ErrNotExist) && c.Name == "model" {
|
if errors.Is(err, os.ErrNotExist) && c.Name == "model" {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user