X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ef960faf045621c89614286fa3d59aedbb38a5ea..e6d87a04919616cf2a6ea6cbda81d5fbc31cc8a2:/uip/new.c diff --git a/uip/new.c b/uip/new.c index bdbdc73f..9a7f9d4f 100644 --- a/uip/new.c +++ b/uip/new.c @@ -261,7 +261,9 @@ check_folders(struct node **first, struct node **last, b.sequences = sequences; if (folders == NULL) { - chdir(m_maildir("")); + if (chdir(m_maildir("")) < 0) { + advise (m_maildir(""), "chdir"); + } crawl_folders(".", crawl_callback, &b); } else { fp = fopen(folders, "r"); @@ -368,6 +370,8 @@ doit(char *cur, char *folders, char *sequences[]) return prev; } } else if (run_mode == UNSEEN) { + int status; + if (node->n_field == NULL) { continue; } @@ -386,7 +390,10 @@ doit(char *cur, char *folders, char *sequences[]) /* TODO: Split enough of scan.c out so that we can call it here. */ command = concat("scan +", node->n_name, " ", sequences_s, (void *)NULL); - system(command); + status = system(command); + if (! WIFEXITED (status)) { + adios (command, "system"); + } free(command); } else { if (node->n_field == NULL) {