Change format for filenames

It seems some tools try to interpret the filename of message files,
even though they shouldn't:
   "Do not try to extract information from unique names."

In particular, they seem to interpret the first part of the name (before
the first dot) as the # of seconds since the Unix epoch (ie.,
time(NULL)). That's not what mu/mu4e put there.

So, let's conform a bit more to the expected filename (as per the
maildir spec), so we're not confusing those tools.
This commit is contained in:
djcb
2015-10-02 17:43:38 +03:00
parent 4774429ad6
commit a350e2047d
3 changed files with 20 additions and 14 deletions

View File

@ -481,7 +481,10 @@ test_mu_maildir_get_new_path_new (void)
str = mu_maildir_get_new_path (paths[i].oldpath, NULL,
paths[i].flags, TRUE);
newbase = g_path_get_basename (str);
assert_matches_regexp (newbase, "\\d{8}-[[:xdigit:]]{8}-[[:alpha:]]+(:2,.*)?");
assert_matches_regexp (newbase,
"\\d+\\."
"[[:xdigit:]]{16}\\."
"[[:alpha:]]+(:2,.*)?");
g_free (newbase);
g_free(str);
}