From 7ed3c128f4df72c37d4d83405b63078e385cf925 Mon Sep 17 00:00:00 2001 From: Arnas Udovicius Date: Mon, 1 Aug 2022 17:16:56 +0300 Subject: [PATCH] fix Id duplicates --- tree.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tree.go b/tree.go index 06087e7..acb139d 100644 --- a/tree.go +++ b/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