#include <h/mh.h>
#include <h/crawl_folders.h>
#include <h/utils.h>
-#include <errno.h>
#define FOLDER_SWITCHES \
X("all", 0, ALLSW) \
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
*/
if (!(mp = folder_read (fold, 1))) {
admonish (NULL, "unable to read folder %s", fold);
+ *crawl_children = FALSE;
return 0;
}
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 */
}