test
This commit is contained in:
parent
f03577ec79
commit
7e5c85837f
5
msg.go
5
msg.go
@ -333,6 +333,7 @@ func UnzipMessages(z []byte) error {
|
||||
}
|
||||
|
||||
for _, f := range zr.File {
|
||||
log.Printf("File : %s\n", f.Name)
|
||||
if strings.Compare(f.Name, "backup.json") == 0 {
|
||||
rc, err := f.Open()
|
||||
logOnError(err, "UnzipMessages : Open")
|
||||
@ -343,9 +344,11 @@ func UnzipMessages(z []byte) error {
|
||||
err = json.NewDecoder(rc).Decode(bkp)
|
||||
rc.Close()
|
||||
log.Printf("UnzipMessages : %d messages.\n", len(bkp.Messages))
|
||||
return nil
|
||||
}
|
||||
log.Printf("File : %s\n", f.Name)
|
||||
}
|
||||
|
||||
log.Printf("Not backup file found.\n")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user