fix Id duplicates
This commit is contained in:
parent
8ea36234a9
commit
7ed3c128f4
1 changed files with 3 additions and 3 deletions
6
tree.go
6
tree.go
|
@ -243,7 +243,7 @@ func addMissingId(dir string, id int64) error {
|
|||
scanner.Split(bufio.ScanLines)
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
if strings.HasPrefix(line, "id:") {
|
||||
if strings.HasPrefix(line, "* id:") {
|
||||
break
|
||||
}
|
||||
if line == "---" {
|
||||
|
@ -299,8 +299,8 @@ func getMaxId(dir string) (int64, error) {
|
|||
break
|
||||
}
|
||||
|
||||
if strings.HasPrefix(line, "id:") {
|
||||
line = strings.TrimPrefix(line, "id:")
|
||||
if strings.HasPrefix(line, "* id:") {
|
||||
line = strings.TrimPrefix(line, "* id:")
|
||||
i := abcex.Decode(strings.Trim(line, " "))
|
||||
if i > max {
|
||||
max = i
|
||||
|
|
Loading…
Reference in a new issue