diff --git a/src/mu-cmd-index.c b/src/mu-cmd-index.c index 6c351bbd..90a84e2d 100644 --- a/src/mu-cmd-index.c +++ b/src/mu-cmd-index.c @@ -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; @@ -230,13 +230,15 @@ update_maildir_path_maybe (MuIndex *idx, MuConfig *opts) opts->maildir = g_strdup (tmp); else opts->maildir = mu_util_guess_maildir (); - } - - exp = mu_util_dir_expand(opts->maildir); - if (exp) { - g_free(opts->maildir); - opts->maildir = exp; } + + if (opts->maildir) { + exp = mu_util_dir_expand(opts->maildir); + if (exp) { + g_free(opts->maildir); + opts->maildir = exp; + } + } return check_maildir (opts->maildir); } diff --git a/src/mu-runtime.c b/src/mu-runtime.c index 89ab7240..14c0c3d3 100644 --- a/src/mu-runtime.c +++ b/src/mu-runtime.c @@ -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] = diff --git a/src/mu-util.c b/src/mu-util.c index 90c2a9a0..e6146e83 100644 --- a/src/mu-util.c +++ b/src/mu-util.c @@ -98,7 +98,7 @@ mu_util_dir_expand (const char *path) /* don't try realpath if the dir does not exist */ if (access (dir, F_OK) != 0) return dir; - + /* now resolve any symlinks, .. etc. */ if (realpath (dir, resolved) == NULL) { g_debug ("%s: could not get realpath for '%s': %s",