aboutsummaryrefslogtreecommitdiff
path: root/internal/journal/read.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:07:57 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:07:57 +0200
commitc66a842ce4679a3ffa5504dad39b1402bea75e9f (patch)
tree9e9db5e569b9f16a4ca4e66d0a5b0f456a186ece /internal/journal/read.go
parentb013e5fb87580e4cab0d85a0d2c8bb402c610413 (diff)
downloadkrino-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.go6
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