From 539bd9be19bd63b73972bce2abdbef3ad51b8576 Mon Sep 17 00:00:00 2001 From: djcb Date: Wed, 18 Nov 2015 09:50:36 +0200 Subject: [PATCH] Fix message file creation Make sure we 0-pad the numeric parts in message file names; this was breaking some unit test. --- lib/mu-maildir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mu-maildir.c b/lib/mu-maildir.c index 2bedb8b9..ba90f791 100644 --- a/lib/mu-maildir.c +++ b/lib/mu-maildir.c @@ -760,13 +760,13 @@ get_new_basename (void) now = time(NULL); - return g_strdup_printf ("%u.%8x%8x.%s", + return g_strdup_printf ("%u.%08x%08x.%s", (guint)now, g_random_int(), (gint32)g_get_monotonic_time (), hostname); } - +g char* mu_maildir_get_new_path (const char *oldpath, const char *new_mdir,