X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/61ccf1dbeea93978803303d2cd43efa5da2cc7d1..802a19d93d6b0c9fb1b4ff5a071f4b41c486ea19:/uip/folder.c diff --git a/uip/folder.c b/uip/folder.c index 9fa29840..fc183774 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -101,13 +101,7 @@ main (int argc, char **argv) char *cp, *dp, *msg = NULL, *argfolder = NULL; char **ap, **argp, buf[BUFSIZ], **arguments; -#ifdef LOCALE - setlocale(LC_ALL, ""); -#endif - invo_name = r1bindex (argv[0], '/'); - - /* read user profile/context */ - context_read(); + if (nmh_init(argv[0], 1)) { return 1; } /* * If program was invoked with name ending @@ -404,6 +398,7 @@ get_folder_info_body (char *fold, char *msg, boolean *crawl_children) */ if (!(mp = folder_read (fold, 1))) { admonish (NULL, "unable to read folder %s", fold); + *crawl_children = FALSE; return 0; } @@ -412,8 +407,10 @@ get_folder_info_body (char *fold, char *msg, boolean *crawl_children) retval = 0; if (fpack) { - if (folder_pack (&mp, fverb) == -1) + if (folder_pack (&mp, fverb) == -1) { + *crawl_children = FALSE; /* to please clang static analyzer */ done (1); + } seq_save (mp); /* synchronize the sequences */ context_save (); /* save the context file */ }