return 0;
}
+static int parse_path_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
+{
+ char path[_POSIX_PATH_MAX];
+
+ do
+ {
+ mutt_extract_token (buf, s, 0);
+ strfcpy (path, buf->data, sizeof (path));
+ mutt_expand_path (path, sizeof (path));
+ add_to_list ((LIST **) data, path);
+ }
+ while (MoreArgs (s));
+
+ return 0;
+}
+
+static int parse_path_unlist (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
+{
+ char path[_POSIX_PATH_MAX];
+
+ do
+ {
+ mutt_extract_token (buf, s, 0);
+ /*
+ * Check for deletion of entire list
+ */
+ if (mutt_strcmp (buf->data, "*") == 0)
+ {
+ mutt_free_list ((LIST **) data);
+ break;
+ }
+ strfcpy (path, buf->data, sizeof (path));
+ mutt_expand_path (path, sizeof (path));
+ remove_from_list ((LIST **) data, path);
+ }
+ while (MoreArgs (s));
+
+ return 0;
+}
+
static int parse_lists (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
group_context_t *gc = NULL;
static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_path_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_path_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_group (BUFFER *, BUFFER *, unsigned long, BUFFER *);
{ "set", parse_set, 0 },
{ "setenv", parse_setenv, 0 },
#ifdef USE_SIDEBAR
- { "sidebar_whitelist",parse_list, UL &SidebarWhitelist },
- { "unsidebar_whitelist",parse_unlist, UL &SidebarWhitelist },
+ { "sidebar_whitelist",parse_path_list, UL &SidebarWhitelist },
+ { "unsidebar_whitelist",parse_path_unlist, UL &SidebarWhitelist },
#endif
{ "source", parse_source, 0 },
{ "spam", parse_spam_list, MUTT_SPAM },