Skip to content

Commit 9a1fabd

Browse files
author
Roman Lomonosov
committed
use newUniq map for parents instead of newSeries
1 parent fd8d929 commit 9a1fabd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

uploader/index.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func (u *Index) parseFile(filename string, out io.Writer) (map[string]bool, erro
4141

4242
version := uint32(time.Now().Unix())
4343
newSeries := make(map[string]bool)
44+
newUniq := make(map[string]bool)
4445
wb := RowBinary.GetWriteBuffer()
4546

4647
var level, index, l int
@@ -103,11 +104,11 @@ LineLoop:
103104
l = level
104105
for l--; l > 0; l-- {
105106
index = bytes.LastIndexByte(p, '.')
106-
if newSeries[unsafeString(p[:index+1])] {
107+
if newUniq[unsafeString(p[:index+1])] {
107108
break
108109
}
109110

110-
newSeries[string(p[:index+1])] = true
111+
newUniq[string(p[:index+1])] = true
111112

112113
wb.WriteUint16(treeDate)
113114
wb.WriteUint32(uint32(l + TreeLevelOffset))

0 commit comments

Comments
 (0)