[PATCH v2 08/16] email-lda: fix name generator

Artem Bityutskiy dedekind1 at gmail.com
Fri Feb 7 00:50:37 PST 2014


From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>

This patch fixes the 'seq_name' finction which generates a file name to use for
storing an mbox. Currently it just appends a counter to the end. And it uses
the "-" for this, like something-counter, but sometimes it uses "_", which is a
bug. Let's fix it and use "-" everiwhere.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 email/aiaiai-email-lda | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/email/aiaiai-email-lda b/email/aiaiai-email-lda
index ef2c890..84a9bbb 100755
--- a/email/aiaiai-email-lda
+++ b/email/aiaiai-email-lda
@@ -126,7 +126,7 @@ seq_name()
 	local name="$1"; shift
 	local i=0
 
-	while [ -e "${where}/${name}_${i}" ]; do
+	while [ -e "${where}/${name}-${i}" ]; do
 		i="$(($i+1))"
 	done
 	printf "%s" "$where/$name-$i"
-- 
1.8.5.2




More information about the aiaiai mailing list