"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "7ff7095ca7672339d136226a15f2779e6fee6f1c"
Unverified Commit ec14f6ce authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

case sensitive filepaths (#4366)

parent c60a0866
...@@ -291,11 +291,9 @@ func (n Name) Filepath() string { ...@@ -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) { ...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment