From 7aa914a7e5b3a31e3d29b393a6a63a1529afccc3 Mon Sep 17 00:00:00 2001 From: Eric Gillespie Date: Wed, 10 Dec 2014 00:39:34 -0800 Subject: [PATCH] Should not sort by mtime for mh folder. Shouldn't normally matter, but if someone runs on a sortm'd range of messages, the assumption about msgnum ordering breaks down. --- minc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/minc b/minc index 49fb5fd..31fefa5 100755 --- a/minc +++ b/minc @@ -898,10 +898,14 @@ if (!caller()) { } else { @ARGV == 0 or pod2usage(); chdir("$inbox/new") or die("chdir($inbox/new): $!"); - @files = getfiles('.'); - } - - my %folders = filter_mail($inbox, map { $_->[1] } + @files = map { $_->[1] } + sort { $a->[0] <=> $b->[0] } + map { + $st = stat($_) or die("stat($_): $!"); + [ $st->mtime, $_ ] + } getfiles('.'); + + @files = map { $_->[1] } sort { $a->[0] <=> $b->[0] } map { if (not ($st = stat($_))) { @@ -909,7 +913,10 @@ if (!caller()) { } [$st->mtime, $_] } - @files); + getfiles('.'); + } + + my %folders = filter_mail($inbox, @files); $run and %folders and update_dot_folders(\%folders); -- 2.56.0