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