mirror of
https://github.com/ollama/ollama.git
synced 2026-11-12 03:46:14 -06:00
Add manifest-list storage so runner-specific manifests can coexist under one tag while preserving existing v1 tags as best-effort downgrade anchors. Show/list/copy/remove/pull/push now understand runner and digest selection and transfer referenced child manifests and layers. Add lazy local compatibility migration for legacy Ollama GGUFs into llama.cpp-compatible children, covering the patched model families and preserving parser/renderer, templates, projectors, media metadata, split GGUFs, and MTP/draft tensors where applicable. Extend create/import/conversion paths for the same compatibility rules, harden manifest-list combine validation, and add focused manifest, migration, transfer, and integration coverage for first-load conversion plus chat/tools/vision/audio/embedding behavior.
25 lines
418 B
Go
25 lines
418 B
Go
//go:build windows
|
|
|
|
package compatmigrate
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func availableSpace(path string) (uint64, error) {
|
|
root := filepath.VolumeName(path) + `\`
|
|
p, err := windows.UTF16PtrFromString(root)
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
|
|
var available uint64
|
|
if err := windows.GetDiskFreeSpaceEx(p, &available, nil, nil); err != nil {
|
|
return 0, err
|
|
}
|
|
|
|
return available, nil
|
|
}
|