diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-02-14 16:11:02 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-02-14 16:11:02 +0000 |
commit | 8794681987c10004c28c5b005869238c2ef1bcb8 (patch) | |
tree | 10836530faf7c557925930bfba626ecdeb053187 | |
parent | 8fc4da4e86d9b914b2765e2b63d35ec64e56bd6d (diff) | |
download | mailutils-8794681987c10004c28c5b005869238c2ef1bcb8.tar.gz mailutils-8794681987c10004c28c5b005869238c2ef1bcb8.tar.bz2 |
(mh_real_install): Create inbox
-rw-r--r-- | mh/mh_init.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mh/mh_init.c b/mh/mh_init.c index 2b555dc38..8b8bdae65 100644 --- a/mh/mh_init.c +++ b/mh/mh_init.c @@ -662,16 +662,16 @@ _env_msg_date (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) static int _env_msg_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) - { +{ message_t msg = envelope_get_owner (envelope); struct msg_envelope *env = message_get_owner (msg); - + if (!env || !env->from) return EINVAL; strncpy (buf, env->from, len); buf[len-1] = 0; return 0; - } +} message_t mh_stream_to_message (stream_t instream) @@ -683,7 +683,7 @@ mh_stream_to_message (stream_t instream) restore_envelope (instream, &mp); if (message_create (&msg, mp)) return NULL; - + message_set_stream (msg, instream, mp); if (envelope_create (&env, msg)) @@ -811,8 +811,11 @@ mh_real_install (char *name, int automode) fclose (fp); } free (ctx); + asprintf (&ctx, "%s/inbox", mhdir); + if (mh_check_folder (ctx, !automode)) + exit (1); + free (ctx); free (mhdir); - /* FIXME: create inbox? */ } void |