[GH-ISSUE #379] Windows usage broken #46679

Closed
opened 2026-04-27 23:28:24 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @FairyTail2000 on GitHub (Aug 18, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/379

While testing my own Frontend for ollama on Windows with the newest version I did noticed that llama seems to be a bit broken:

  • While loading tags the filepath.Walk in server/routes.go:340 returns null. Why? Because on line 355 "slashIndex := strings.LastIndex(path, "/")" returns -1 since a windows path does not contain a / but rather an . The fix for windows is to replace the character in the code and recompile
  • In server/modelpath.go:82 is the next problem on line 87. "path := filepath.Join(home, ".ollama", "models", "manifests", mp.Registry, mp.Namespace, mp.Repository, mp.Tag)" is here the problem, at least for the codeup model
    The parts that make up the path look like this: 'C:\Users<censored> .ollama models manifests registry.ollama.ai library registry.ollama.ai\library\codeup latest' for codup. Which will obviously won't work as the path gets stanced together as ' C:\Users<censored>.ollama\models\manifests\registry.ollama.ai\library\registry.ollama.ai\library\codeup\latest'
    The fix for at least the codeup model is this:
    path := filepath.Join(home, ".ollama", "models", "manifests", mp.Repository, mp.Tag)

I haven't tested this however with other models as I don't have lightning speeds and little to no go experience

Originally created by @FairyTail2000 on GitHub (Aug 18, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/379 While testing my own Frontend for ollama on Windows with the newest version I did noticed that llama seems to be a bit broken: - While loading tags the filepath.Walk in server/routes.go:340 returns null. Why? Because on line 355 "slashIndex := strings.LastIndex(path, "/")" returns -1 since a windows path does not contain a / but rather an \. The fix for windows is to replace the character in the code and recompile - In server/modelpath.go:82 is the next problem on line 87. "path := filepath.Join(home, ".ollama", "models", "manifests", mp.Registry, mp.Namespace, mp.Repository, mp.Tag)" is here the problem, at least for the codeup model The parts that make up the path look like this: 'C:\Users\<censored> .ollama models manifests registry.ollama.ai library registry.ollama.ai\library\codeup latest' for codup. Which will obviously won't work as the path gets stanced together as ' C:\Users\<censored>\.ollama\models\manifests\registry.ollama.ai\library\registry.ollama.ai\library\codeup\latest' The fix for at least the codeup model is this: path := filepath.Join(home, ".ollama", "models", "manifests", mp.Repository, mp.Tag) I haven't tested this however with other models as I don't have lightning speeds and little to no go experience
GiteaMirror added the bugwindows labels 2026-04-27 23:28:25 -05:00
Author
Owner

@FairyTail2000 commented on GitHub (Aug 18, 2023):

Also this manifests in the following ollama list output:

PS C:\Users<>\git\ollama> .\ollama.exe list
NAME SIZE MODIFIED
PS C:\Users<>\git\ollama> .\ollama.exe list
NAME SIZE MODIFIED
PS C:\Users<>\git\ollama> .\ollama.exe list
NAME SIZE MODIFIED
PS C:\Users<>\git\ollama> .\ollama.exe list

<!-- gh-comment-id:1683876703 --> @FairyTail2000 commented on GitHub (Aug 18, 2023): Also this manifests in the following ollama list output: > PS C:\Users\<>\git\ollama> .\ollama.exe list > NAME SIZE MODIFIED > PS C:\Users\<>\git\ollama> .\ollama.exe list > NAME SIZE MODIFIED > PS C:\Users\<>\git\ollama> .\ollama.exe list > NAME SIZE MODIFIED > PS C:\Users\<>\git\ollama> .\ollama.exe list
Author
Owner

@technovangelist commented on GitHub (Aug 23, 2023):

Thanks for submitting this. We are getting closer to a Windows release and will ensure this is resolved with that release. I'll leave this open till then.

<!-- gh-comment-id:1690789545 --> @technovangelist commented on GitHub (Aug 23, 2023): Thanks for submitting this. We are getting closer to a Windows release and will ensure this is resolved with that release. I'll leave this open till then.
Author
Owner

@mchiang0610 commented on GitHub (Aug 30, 2023):

Closing this to merge with another duplicate: https://github.com/jmorganca/ollama/issues/403

Windows is coming!

<!-- gh-comment-id:1699854289 --> @mchiang0610 commented on GitHub (Aug 30, 2023): Closing this to merge with another duplicate: https://github.com/jmorganca/ollama/issues/403 Windows is coming!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#46679