case sensitive filepaths (#4366)
This commit is contained in:
parent
c60a086635
commit
ec14f6ceda
2 changed files with 5 additions and 7 deletions
|
@ -291,11 +291,9 @@ func (n Name) Filepath() string {
|
||||||
panic("illegal attempt to get filepath of invalid name")
|
panic("illegal attempt to get filepath of invalid name")
|
||||||
}
|
}
|
||||||
return filepath.Join(
|
return filepath.Join(
|
||||||
strings.ToLower(filepath.Join(
|
n.Host,
|
||||||
n.Host,
|
n.Namespace,
|
||||||
n.Namespace,
|
n.Model,
|
||||||
n.Model,
|
|
||||||
)),
|
|
||||||
n.Tag,
|
n.Tag,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,9 +276,9 @@ func TestFilepathAllocs(t *testing.T) {
|
||||||
allocs := testing.AllocsPerRun(1000, func() {
|
allocs := testing.AllocsPerRun(1000, func() {
|
||||||
n.Filepath()
|
n.Filepath()
|
||||||
})
|
})
|
||||||
var allowedAllocs float64 = 3
|
var allowedAllocs float64 = 1
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
allowedAllocs = 5
|
allowedAllocs = 3
|
||||||
}
|
}
|
||||||
if allocs > allowedAllocs {
|
if allocs > allowedAllocs {
|
||||||
t.Errorf("allocs = %v; allowed %v", allocs, allowedAllocs)
|
t.Errorf("allocs = %v; allowed %v", allocs, allowedAllocs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue