ash: "you have mail" should ignore first change in mtime
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 9 Oct 2015 14:02:53 +0000 (16:02 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 9 Oct 2015 14:02:53 +0000 (16:02 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c

index 07e7f621ab7d8e43fa9ded3c587676ab8e7dc43e..b096812962d1041ef979a52ae55f0b2cfc46d55f 100644 (file)
@@ -10073,8 +10073,9 @@ chkmail(void)
                new_hash += (unsigned)statb.st_mtime;
        }
        if (!mail_var_path_changed && mailtime_hash != new_hash) {
+               if (mailtime_hash != 0)
+                       out2str("you have mail\n");
                mailtime_hash = new_hash;
-               out2str("you have mail\n");
        }
        mail_var_path_changed = 0;
        popstackmark(&smark);