From 8505268edf36cf15d87d95a53b8da00223e1d8b3 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 18 Apr 2017 13:06:21 +0100 Subject: [PATCH] Zero-pad logfile names (#11) - so that they are sorted properly --- src/github.com/matrix-org/rageshake/submit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/rageshake/submit.go b/src/github.com/matrix-org/rageshake/submit.go index 440cec2..63b4236 100644 --- a/src/github.com/matrix-org/rageshake/submit.go +++ b/src/github.com/matrix-org/rageshake/submit.go @@ -179,7 +179,7 @@ func (s *submitServer) saveReport(ctx context.Context, p payload) (*submitRespon } for i, log := range p.Logs { - if err := gzipAndSave([]byte(log.Lines), prefix, fmt.Sprintf("logs-%d.log.gz", i)); err != nil { + if err := gzipAndSave([]byte(log.Lines), prefix, fmt.Sprintf("logs-%04d.log.gz", i)); err != nil { return nil, err // TODO: Rollback? } }