From 41d8613de795328b997303ed2e39dff3def34902 Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Wed, 15 Nov 2023 00:05:29 -0500 Subject: [PATCH] cmd/snapper: Actually process --why properly --- cmd/snappr/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/snappr/main.go b/cmd/snappr/main.go index 7e5aa66..8319865 100644 --- a/cmd/snappr/main.go +++ b/cmd/snappr/main.go @@ -131,7 +131,9 @@ func main() { for i, period := range why { ps[i] = period.String() } - fmt.Fprintf(os.Stderr, "snappr: why: keep [%*d/%*d] %s :: %s\n", ndig, at+1, ndig, len(keep), times[at].Format("Mon 2006 Jan _2 15:04:05"), strings.Join(ps, ", ")) + if *Why { + fmt.Fprintf(os.Stderr, "snappr: why: keep [%*d/%*d] %s :: %s\n", ndig, at+1, ndig, len(keep), snapshots[at].Format("Mon 2006 Jan _2 15:04:05"), strings.Join(ps, ", ")) + } } else { pruned++ }