* mu-cmd-find.c: with --format=links, always try to create the target maildir,

even if the toplevel already exists
This commit is contained in:
Dirk-Jan C. Binnema 2012-02-26 12:17:56 +02:00
parent f27af1158b
commit 8f833c55c5
1 changed files with 8 additions and 6 deletions

View File

@ -394,12 +394,13 @@ create_linksdir_maybe (const char *linksdir, gboolean clearlinks)
GError *err;
err = NULL;
if (access (linksdir, F_OK) != 0) {
if (!mu_maildir_mkdir (linksdir, 0700, TRUE, &err))
goto fail;
} else if (clearlinks)
if (!mu_maildir_clear_links (linksdir, &err))
goto fail;
/* note, mu_maildir_mkdir simply ignores whatever part of the
* mail dir already exists */
if (!mu_maildir_mkdir (linksdir, 0700, TRUE, &err))
goto fail;
if (clearlinks && !mu_maildir_clear_links (linksdir, &err))
goto fail;
return TRUE;
@ -797,6 +798,7 @@ output_xml (MuMsgIter *iter, gboolean include_unreadable, GError **err)
output_xml_msg (msg);
++count;
}
g_print ("</messages>\n");