Don't crash when hash not in map.

This commit is contained in:
Bill Thiede 2014-02-26 20:29:49 -08:00
parent b2910c8ec0
commit 73f1751d5b

View File

@ -123,7 +123,11 @@ func (m Messages) Reconcile(maildir string) error {
chksum := fmt.Sprintf("%x", h.Sum(nil))
md := email.NewInfo(path)
s := hashMap[chksum]
s, ok := hashMap[chksum]
if !ok {
return nil
}
glog.V(2).Infof("Comparing flags of %q to %q", path, s.Path)
if md.Seen != s.Read {
md.Seen = s.Read