(mh_real_install): Create inbox
Showing
1 changed file
with
8 additions
and
5 deletions
... | @@ -662,16 +662,16 @@ _env_msg_date (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) | ... | @@ -662,16 +662,16 @@ _env_msg_date (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) |
662 | 662 | ||
663 | static int | 663 | static int |
664 | _env_msg_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) | 664 | _env_msg_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite) |
665 | { | 665 | { |
666 | message_t msg = envelope_get_owner (envelope); | 666 | message_t msg = envelope_get_owner (envelope); |
667 | struct msg_envelope *env = message_get_owner (msg); | 667 | struct msg_envelope *env = message_get_owner (msg); |
668 | 668 | ||
669 | if (!env || !env->from) | 669 | if (!env || !env->from) |
670 | return EINVAL; | 670 | return EINVAL; |
671 | strncpy (buf, env->from, len); | 671 | strncpy (buf, env->from, len); |
672 | buf[len-1] = 0; | 672 | buf[len-1] = 0; |
673 | return 0; | 673 | return 0; |
674 | } | 674 | } |
675 | 675 | ||
676 | message_t | 676 | message_t |
677 | mh_stream_to_message (stream_t instream) | 677 | mh_stream_to_message (stream_t instream) |
... | @@ -683,7 +683,7 @@ mh_stream_to_message (stream_t instream) | ... | @@ -683,7 +683,7 @@ mh_stream_to_message (stream_t instream) |
683 | restore_envelope (instream, &mp); | 683 | restore_envelope (instream, &mp); |
684 | if (message_create (&msg, mp)) | 684 | if (message_create (&msg, mp)) |
685 | return NULL; | 685 | return NULL; |
686 | 686 | ||
687 | message_set_stream (msg, instream, mp); | 687 | message_set_stream (msg, instream, mp); |
688 | 688 | ||
689 | if (envelope_create (&env, msg)) | 689 | if (envelope_create (&env, msg)) |
... | @@ -811,8 +811,11 @@ mh_real_install (char *name, int automode) | ... | @@ -811,8 +811,11 @@ mh_real_install (char *name, int automode) |
811 | fclose (fp); | 811 | fclose (fp); |
812 | } | 812 | } |
813 | free (ctx); | 813 | free (ctx); |
814 | asprintf (&ctx, "%s/inbox", mhdir); | ||
815 | if (mh_check_folder (ctx, !automode)) | ||
816 | exit (1); | ||
817 | free (ctx); | ||
814 | free (mhdir); | 818 | free (mhdir); |
815 | /* FIXME: create inbox? */ | ||
816 | } | 819 | } |
817 | 820 | ||
818 | void | 821 | void | ... | ... |
-
Please register or sign in to post a comment