diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 23:07:57 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 23:07:57 +0200 |
| commit | c66a842ce4679a3ffa5504dad39b1402bea75e9f (patch) | |
| tree | 9e9db5e569b9f16a4ca4e66d0a5b0f456a186ece /internal/journal/read.go | |
| parent | b013e5fb87580e4cab0d85a0d2c8bb402c610413 (diff) | |
| download | krino-c66a842ce4679a3ffa5504dad39b1402bea75e9f.tar.gz krino-c66a842ce4679a3ffa5504dad39b1402bea75e9f.zip | |
plan 10 re-check: cut run column, damaged undo run, emptied directory cleanup, text turning binary, explain flags, interrupt docsv0.0.7
Diffstat (limited to 'internal/journal/read.go')
| -rw-r--r-- | internal/journal/read.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/journal/read.go b/internal/journal/read.go index 48cd6b0..9099c0d 100644 --- a/internal/journal/read.go +++ b/internal/journal/read.go @@ -172,10 +172,12 @@ func Entries(path, runID string) ([]Entry, error) { // runFieldOf best-effort extracts a line's Run column even when the line // otherwise fails to parse, so Entries can tell whether an unparsable line -// belonged to the run it was asked for. +// belonged to the run it was asked for. The column counts only when a tab +// ends it: a line cut inside it holds a prefix of some run's ID, which names +// no run (plan 10 re-check R2). func runFieldOf(line string) (string, bool) { f := strings.SplitN(line, "\t", 3) - if len(f) < 2 { + if len(f) < 3 { return "", false } return unescape(f[1]), true |
