This commit is contained in:
shoopea 2019-06-09 22:40:22 +08:00
parent a4268584c2
commit f03577ec79

11
msg.go
View File

@ -333,6 +333,17 @@ func UnzipMessages(z []byte) error {
}
for _, f := range zr.File {
if strings.Compare(f.Name, "backup.json") == 0 {
rc, err := f.Open()
logOnError(err, "UnzipMessages : Open")
if err != nil {
return err
}
bkp := DataBackup{}
err = json.NewDecoder(rc).Decode(bkp)
rc.Close()
log.Printf("UnzipMessages : %d messages.\n", len(bkp.Messages))
}
log.Printf("File : %s\n", f.Name)
}