mirror of https://github.com/djcb/mu.git
* fix infinite loop in mu-cmd-index (fixes issue #36) + some cosmetics
This commit is contained in:
parent
3b3dc10b67
commit
8f9bd404cf
|
@ -107,7 +107,7 @@ static gboolean
|
|||
check_maildir (const char *maildir)
|
||||
{
|
||||
if (!maildir) {
|
||||
g_warning ("no maildir to work on");
|
||||
g_warning ("no maildir to work on; use --maildir= to set it explicitly");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ update_maildir_path_maybe (MuIndex *idx, MuConfig *opts)
|
|||
/* if 'maildir_guessed' is TRUE, we can override it later
|
||||
* with mu_index_last_used_maildir (in mu-cmd-index.c)
|
||||
*/
|
||||
while (!opts->maildir) {
|
||||
if (!opts->maildir) {
|
||||
|
||||
const char *tmp;
|
||||
|
||||
|
@ -232,11 +232,13 @@ update_maildir_path_maybe (MuIndex *idx, MuConfig *opts)
|
|||
opts->maildir = mu_util_guess_maildir ();
|
||||
}
|
||||
|
||||
if (opts->maildir) {
|
||||
exp = mu_util_dir_expand(opts->maildir);
|
||||
if (exp) {
|
||||
g_free(opts->maildir);
|
||||
opts->maildir = exp;
|
||||
}
|
||||
}
|
||||
|
||||
return check_maildir (opts->maildir);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ init_paths (const char* muhome, MuRuntimeData *data)
|
|||
MU_XAPIAN_DIRNAME);
|
||||
|
||||
data->_str [MU_RUNTIME_PATH_BOOKMARKS] =
|
||||
g_strdup_printf ("%s%c%s", muhome,G_DIR_SEPARATOR,
|
||||
g_strdup_printf ("%s%c%s", muhome, G_DIR_SEPARATOR,
|
||||
MU_BOOKMARKS_FILENAME);
|
||||
|
||||
data->_str [MU_RUNTIME_PATH_CACHE] =
|
||||
|
|
Loading…
Reference in New Issue