]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-lda: make the queued file name saner
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 6 Feb 2014 13:28:37 +0000 (15:28 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 7 Feb 2014 08:56:26 +0000 (10:56 +0200)
When aiaiai-email-lda collects all patches in the series, it concatenates them
into a single file, and calls 'queue_mboxfile'. This function basically saves
a copy of the mbox in the "queue_saved" directory, and then moves it to the
queue directory.

The name of the file will be like this: date_m_of_n-counter.

However, the "m" part makes no sense at all. It is equivalent to the mumber of
the patch which came last. For example, if we have a series of 2 patches, and
path 1 came last, the name will be:

date_1_of_2-counter

Or if patch 2 came last, the name will be

date_2_of_2-counter

And this makes no sense. Just remove the "m" part from the name and make it to
be:

date_2-counter.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-lda

index f876b074f1918ac84354c4b53eae3d1d37b986ca..ef2c8902f5d2d6a78c07581f8dcf62c56134963b 100755 (executable)
@@ -134,7 +134,7 @@ seq_name()
 
 queue_mboxfile()
 {
-       local fname="$(seq_name "$queue" "${date}_${m}-of-${n}")"
+       local fname="$(seq_name "$queue" "${date}_${n}")"
        cp $verbose -- "$mbox" "$queue_saved/${fname##*/}" >&2
        mv $verbose -- "$mbox" "$fname" >&2
 }