Don't crash when hash not in map.
This commit is contained in:
parent
b2910c8ec0
commit
73f1751d5b
@ -123,7 +123,11 @@ func (m Messages) Reconcile(maildir string) error {
|
|||||||
|
|
||||||
chksum := fmt.Sprintf("%x", h.Sum(nil))
|
chksum := fmt.Sprintf("%x", h.Sum(nil))
|
||||||
md := email.NewInfo(path)
|
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)
|
glog.V(2).Infof("Comparing flags of %q to %q", path, s.Path)
|
||||||
if md.Seen != s.Read {
|
if md.Seen != s.Read {
|
||||||
md.Seen = s.Read
|
md.Seen = s.Read
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user