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

5
msg.go
View File

@ -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
}