mirror of https://github.com/djcb/mu.git
* mu-config: add cleanup option, expand all dir parameters (ie, "~")
This commit is contained in:
parent
bc03af4b32
commit
cb2b5b555f
|
@ -62,7 +62,9 @@ mu_config_options_group_index (MuConfigOptions *opts)
|
||||||
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &opts->maildir,
|
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &opts->maildir,
|
||||||
"top of the maildir", NULL},
|
"top of the maildir", NULL},
|
||||||
{"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex,
|
{"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 }
|
{ NULL, 0, 0, 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,14 +118,17 @@ void
|
||||||
mu_config_set_defaults (MuConfigOptions *opts)
|
mu_config_set_defaults (MuConfigOptions *opts)
|
||||||
{
|
{
|
||||||
g_return_if_fail (opts);
|
g_return_if_fail (opts);
|
||||||
|
|
||||||
if (!opts->muhome)
|
if (!opts->muhome)
|
||||||
opts->muhome = mu_util_dir_expand ("~/.mu");
|
opts->muhome = "~/.mu";
|
||||||
|
opts->muhome = mu_util_dir_expand ("~/.mu");
|
||||||
|
|
||||||
opts->log_stderr = FALSE;
|
opts->log_stderr = FALSE;
|
||||||
|
|
||||||
/* indexing */
|
/* indexing */
|
||||||
if (!opts->maildir)
|
if (opts->maildir)
|
||||||
|
opts->maildir = mu_util_dir_expand (opts->maildir);
|
||||||
|
else
|
||||||
opts->maildir = mu_util_guess_maildir();
|
opts->maildir = mu_util_guess_maildir();
|
||||||
|
|
||||||
/* querying */
|
/* querying */
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct _MuConfigOptions {
|
||||||
|
|
||||||
/* options for indexing */
|
/* options for indexing */
|
||||||
char *maildir; /* where the mails are */
|
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 */
|
gboolean reindex; /* re-index existing mails */
|
||||||
|
|
||||||
/* options for querying */
|
/* options for querying */
|
||||||
|
|
Loading…
Reference in New Issue