Don't crash when hash not in map.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user