mirror of
https://github.com/ollama/ollama.git
synced 2025-12-09 16:41:50 +01:00
Fix absolute path names + gguf detection (#8428)
This commit is contained in:
@@ -564,7 +564,9 @@ func isValidCommand(cmd string) bool {
|
||||
}
|
||||
|
||||
func expandPathImpl(path, relativeDir string, currentUserFunc func() (*user.User, error), lookupUserFunc func(string) (*user.User, error)) (string, error) {
|
||||
if strings.HasPrefix(path, "~") {
|
||||
if filepath.IsAbs(path) || strings.HasPrefix(path, "\\") || strings.HasPrefix(path, "/") {
|
||||
return filepath.Abs(path)
|
||||
} else if strings.HasPrefix(path, "~") {
|
||||
var homeDir string
|
||||
|
||||
if path == "~" || strings.HasPrefix(path, "~/") {
|
||||
|
||||
Reference in New Issue
Block a user