case sensitive filepaths (#4366)

This commit is contained in:
Michael Yang 2024-05-11 14:12:36 -07:00 committed by GitHub
parent c60a086635
commit ec14f6ceda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View file

@ -291,11 +291,9 @@ func (n Name) Filepath() string {
panic("illegal attempt to get filepath of invalid name")
}
return filepath.Join(
strings.ToLower(filepath.Join(
n.Host,
n.Namespace,
n.Model,
)),
n.Host,
n.Namespace,
n.Model,
n.Tag,
)
}

View file

@ -276,9 +276,9 @@ func TestFilepathAllocs(t *testing.T) {
allocs := testing.AllocsPerRun(1000, func() {
n.Filepath()
})
var allowedAllocs float64 = 3
var allowedAllocs float64 = 1
if runtime.GOOS == "windows" {
allowedAllocs = 5
allowedAllocs = 3
}
if allocs > allowedAllocs {
t.Errorf("allocs = %v; allowed %v", allocs, allowedAllocs)