From: Richard Russon Date: Sun, 26 Aug 2018 16:05:05 +0000 (+0100) Subject: probe maildir X-Git-Tag: 2019-10-25~682^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=395ab2e92dab794f0e7d3ebb8a2edd3bbfffe0af;p=neomutt probe maildir --- diff --git a/browser.c b/browser.c index ecf440562..2a877108f 100644 --- a/browser.c +++ b/browser.c @@ -1009,7 +1009,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state) if ((!S_ISREG(s.st_mode)) && (!S_ISDIR(s.st_mode)) && (!S_ISLNK(s.st_mode))) continue; - if (mx_is_maildir(np->b->path)) + if (maildir_path_probe(np->b->path, NULL) == MUTT_MAILDIR) { struct stat st2; char md[PATH_MAX]; diff --git a/maildir/maildir.h b/maildir/maildir.h index 065abaa25..1b807a9c1 100644 --- a/maildir/maildir.h +++ b/maildir/maildir.h @@ -66,8 +66,6 @@ bool maildir_update_flags(struct Context *ctx, struct Header *o, struc bool mh_mailbox(struct Mailbox *mailbox, bool check_stats); int mh_check_empty(const char *path); -bool mx_is_maildir(const char *path); -bool mx_is_mh(const char *path); int maildir_path_probe(const char *path, const struct stat *st); int mh_path_probe(const char *path, const struct stat *st); diff --git a/maildir/mh.c b/maildir/mh.c index 3e8597cf0..8c68fc8a5 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -2888,16 +2888,6 @@ int maildir_path_probe(const char *path, const struct stat *st) return MUTT_UNKNOWN; } -/** - * mx_is_maildir - Is this a Maildir mailbox? - * @param path Path to test - * @retval true If it is - */ -bool mx_is_maildir(const char *path) -{ - return (maildir_path_probe(path, NULL) == MUTT_MAILDIR); -} - /** * mh_path_probe - Is this an mh mailbox? - Implements MxOps::path_probe */ @@ -2941,16 +2931,6 @@ int mh_path_probe(const char *path, const struct stat *st) return MUTT_UNKNOWN; } -/** - * mx_is_mh - Is this an mh mailbox? - * @param path Path to test - * @retval true If it is - */ -bool mx_is_mh(const char *path) -{ - return (mh_path_probe(path, NULL) == MUTT_MH); -} - /** * maildir_path_canon - Canonicalise a mailbox path - Implements MxOps::path_canon */