mirror of https://github.com/djcb/mu.git
* mu-cmd-index.c: add a check for the --xbatchsize parameter
This commit is contained in:
parent
169196498e
commit
0101837c38
|
@ -97,7 +97,12 @@ check_index_or_cleanup_params (MuConfigOptions *opts)
|
||||||
opts->maildir ? opts->maildir : "<none>");
|
opts->maildir ? opts->maildir : "<none>");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts->xbatchsize < 0) {
|
||||||
|
g_warning ("the Xapian batch size must be non-negative");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!mu_util_check_dir (opts->maildir, TRUE, FALSE)) {
|
if (!mu_util_check_dir (opts->maildir, TRUE, FALSE)) {
|
||||||
g_warning ("not a valid Maildir: %s",
|
g_warning ("not a valid Maildir: %s",
|
||||||
opts->maildir ? opts->maildir : "<none>");
|
opts->maildir ? opts->maildir : "<none>");
|
||||||
|
@ -278,7 +283,8 @@ cmd_index_or_cleanup (MuConfigOptions *opts)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
if (!(midx = mu_index_new (mu_runtime_xapian_dir(), &err))) {
|
if (!(midx = mu_index_new (mu_runtime_xapian_dir(), opts->xbatchsize,
|
||||||
|
&err))) {
|
||||||
g_warning ("index/cleanup failed: %s",
|
g_warning ("index/cleanup failed: %s",
|
||||||
err->message);
|
err->message);
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
|
|
Loading…
Reference in New Issue