projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
mx.c
diff --git
a/mx.c
b/mx.c
index
4f0c75b
..
c99d243
100644
(file)
--- a/
mx.c
+++ b/
mx.c
@@
-155,7
+155,6
@@
static int mx_get_idx (const char* path) {
for (i = 0; i < MailboxFormats->length; i++) {
t = MX_COMMAND(i,mx_is_magic)(path);
for (i = 0; i < MailboxFormats->length; i++) {
t = MX_COMMAND(i,mx_is_magic)(path);
- fprintf (stderr, " test %s for %i == %i\n", NONULL(path), i, t);
if (t >= 1)
return (t-1); /* use type as index for array */
}
if (t >= 1)
return (t-1); /* use type as index for array */
}
@@
-331,10
+330,8
@@
int mx_get_magic (const char *path) {
if (safe_strlen (path) == 0)
return (-1);
if (safe_strlen (path) == 0)
return (-1);
- if ((i = mx_get_idx (path)) >= 0) {
- fprintf (stderr, "%s is %i\n", NONULL(path), i);
+ if ((i = mx_get_idx (path)) >= 0)
return (MX_COMMAND(i,type));
return (MX_COMMAND(i,type));
- }
return (-1);
}
return (-1);
}
@@
-553,8
+550,7
@@
CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT * pctx)
if (!ctx->quiet)
mutt_message (_("Reading %s..."), ctx->path);
if (!ctx->quiet)
mutt_message (_("Reading %s..."), ctx->path);
- if ((rc = mx_get_idx (ctx->path)) >= 0)
- rc = MX_COMMAND(rc,mx_open_mailbox)(ctx);
+ rc = MX_COMMAND(ctx->magic-1,mx_open_mailbox)(ctx);
if (rc == 0) {
if ((flags & M_NOSORT) == 0) {
if (rc == 0) {
if ((flags & M_NOSORT) == 0) {