diff options
Diffstat (limited to 'libmailutils/base/schemeauto.c')
-rw-r--r-- | libmailutils/base/schemeauto.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libmailutils/base/schemeauto.c b/libmailutils/base/schemeauto.c index dc374110b..da4f3c8ea 100644 --- a/libmailutils/base/schemeauto.c +++ b/libmailutils/base/schemeauto.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2024 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,7 @@ # include <config.h> #endif #include <stdlib.h> +#include <string.h> #include <mailutils/url.h> /* Returns true if SCHEME represents a local (autodetect) mail folder. */ @@ -47,8 +48,12 @@ mu_autodetect_accuracy (void) if (accuracy == MU_AUTODETECT_ACCURACY_AUTO) { char *p = getenv ("MU_AUTODETECT_ACCURACY"); - if (!p) + if (!p || strcmp (p, "default") == 0) accuracy = MU_AUTODETECT_ACCURACY_DEFAULT; + else if (strcmp (p, "fast") == 0) + accuracy = MU_AUTODETECT_ACCURACY_FAST; + else if (strcmp (p, "max") == 0) + accuracy = MU_AUTODETECT_ACCURACY_MAX; else accuracy = atoi (p); } |