mirror of https://github.com/djcb/mu.git
* minor
This commit is contained in:
parent
4d45b8b54c
commit
0364433cc1
|
@ -163,10 +163,11 @@ get_target_fullpath (const char* src, const gchar *targetpath, GError **err)
|
|||
|
||||
srcfile = g_path_get_basename (src);
|
||||
|
||||
/* create targetpath; note: make the filename cough* unique by
|
||||
*including a hash * of the srcname in the targetname. This
|
||||
*helps if there are * copies of a message (which all have the
|
||||
*same basename)*/
|
||||
/* create targetpath; note: make the filename *cough* unique
|
||||
* by including a hash of the srcname in the targetname. This
|
||||
* helps if there are copies of a message (which all have the
|
||||
* same basename)
|
||||
*/
|
||||
targetfullpath = g_strdup_printf ("%s%c%s%c%u_%s",
|
||||
targetpath,
|
||||
G_DIR_SEPARATOR,
|
||||
|
@ -700,8 +701,8 @@ mu_maildir_get_flags_from_path (const char *path)
|
|||
* /home/user/Maildir/foo/bar/new/abc and flags == MU_FLAG_REPLIED
|
||||
* => /home/user/Maildir/foo/bar/cur
|
||||
*
|
||||
* so the difference is whether MuFlags matches MU_FLAG_NEW is set or
|
||||
* not; and in the latter case, no other flags are allowed.
|
||||
* so the difference is whether MU_FLAG_NEW is set or not; and in the
|
||||
* latter case, no other flags are allowed.
|
||||
*
|
||||
*/
|
||||
static gchar*
|
||||
|
@ -749,10 +750,10 @@ mu_maildir_get_maildir_from_path (const char* path)
|
|||
static char*
|
||||
get_new_basename (void)
|
||||
{
|
||||
char date[9]; /* YYYYMMDD */
|
||||
char hostname[32]; /* should be enough...*/
|
||||
long int rnd;
|
||||
time_t now;
|
||||
char date[9]; /* YYYYMMDD */
|
||||
char hostname[32]; /* should be enough...*/
|
||||
long int rnd;
|
||||
time_t now;
|
||||
|
||||
now = time(NULL);
|
||||
strftime (date, sizeof(date), "%Y%m%d", localtime(&now));
|
||||
|
@ -760,7 +761,8 @@ get_new_basename (void)
|
|||
memcpy (hostname, "hostname", strlen("hostname"));
|
||||
rnd = random ();
|
||||
|
||||
return g_strdup_printf ("%s-%06x-%s", date, (unsigned)rnd, hostname);
|
||||
return g_strdup_printf ("%s-%08x-%s", date,
|
||||
(unsigned)rnd, hostname);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ find_or_create (GHashTable *id_table, MuMsg *msg, guint docid)
|
|||
|
||||
c2 = mu_container_new (msg, docid, fake_msgid);
|
||||
c2->flags = MU_CONTAINER_FLAG_DUP;
|
||||
c = mu_container_append_children (c, c2);
|
||||
/*c = */ mu_container_append_children (c, c2);
|
||||
|
||||
g_hash_table_insert (id_table, (gpointer)fake_msgid, c2);
|
||||
|
||||
|
@ -266,7 +266,8 @@ handle_references (GHashTable *id_table, MuContainer *c)
|
|||
as a child of the other, don't add the link. */
|
||||
|
||||
if (child_elligible (parent, child, created))
|
||||
parent = mu_container_append_children (parent, child);
|
||||
/*parent =*/
|
||||
mu_container_append_children (parent, child);
|
||||
|
||||
parent = child;
|
||||
}
|
||||
|
@ -307,7 +308,7 @@ handle_references (GHashTable *id_table, MuContainer *c)
|
|||
c->next = c->last = c->parent = NULL;
|
||||
}
|
||||
|
||||
parent = mu_container_append_children (parent, c);
|
||||
/*parent = */mu_container_append_children (parent, c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue