Update comment to be accurate.
This commit is contained in:
parent
ac76e5e706
commit
c674f7e243
|
@ -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
|
// some clients use sensible names (foo.N.log), which we preserve. For
|
||||||
// others, we just make up a filename.
|
// 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
|
var leafName string
|
||||||
if logRegexp.MatchString(filename) {
|
if logRegexp.MatchString(filename) {
|
||||||
leafName = filename
|
leafName = filename
|
||||||
if !strings.HasSuffix(filename, ".gz") {
|
if !strings.HasSuffix(filename, ".gz") {
|
||||||
leafName += ".gz"
|
leafName += ".gz"
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue