Update comment to be accurate.

This commit is contained in:
Michael Kaye 2022-01-24 13:41:36 +00:00
parent ac76e5e706
commit c674f7e243

View file

@ -435,10 +435,13 @@ func saveLogPart(logNum int, filename string, reader io.Reader, reportDir string
// some clients use sensible names (foo.N.log), which we preserve. For
// others, we just make up a filename.
//
// Either way, we need to append .gz, because we're compressing it.
// We append a ".gz" extension if not already present, as the final file we store on
// disk will be gzipped. The original filename may or may not contain a '.gz' depending
// on the client that uploaded it, and if it was uploaded already compressed.
var leafName string
if logRegexp.MatchString(filename) {
leafName = filename
leafName = filename
if !strings.HasSuffix(filename, ".gz") {
leafName += ".gz"
}