* mu-config: add cleanup option, expand all dir parameters (ie, "~")

This commit is contained in:
Dirk-Jan C. Binnema 2010-01-04 20:20:35 +02:00
parent bc03af4b32
commit cb2b5b555f
2 changed files with 10 additions and 5 deletions

View File

@ -62,7 +62,9 @@ mu_config_options_group_index (MuConfigOptions *opts)
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &opts->maildir,
"top of the maildir", NULL},
{"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex,
"index even already indexed messages ", NULL},
"index alread indexed messages too", NULL},
{"cleanup", 'u', 0, G_OPTION_ARG_NONE, &opts->cleanup,
"cleanup database after indexing", NULL},
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
@ -116,14 +118,17 @@ void
mu_config_set_defaults (MuConfigOptions *opts)
{
g_return_if_fail (opts);
if (!opts->muhome)
opts->muhome = mu_util_dir_expand ("~/.mu");
opts->muhome = "~/.mu";
opts->muhome = mu_util_dir_expand ("~/.mu");
opts->log_stderr = FALSE;
/* indexing */
if (!opts->maildir)
if (opts->maildir)
opts->maildir = mu_util_dir_expand (opts->maildir);
else
opts->maildir = mu_util_guess_maildir();
/* querying */

View File

@ -40,7 +40,7 @@ struct _MuConfigOptions {
/* options for indexing */
char *maildir; /* where the mails are */
gboolean cleanup; /* cleanup deleted mails form db */
gboolean cleanup; /* cleanup deleted mails from db */
gboolean reindex; /* re-index existing mails */
/* options for querying */