return NULL;
if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
- free(seqfile);
if (failed_to_lock) {
adios (seqfile, "failed to lock");
} else {
+ free(seqfile);
return NULL;
}
}
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");
/* 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);
+ if (system(command) == NOTOK) {
+ adios (command, "system");
+ }
free(command);
} else {
if (node->n_field == NULL) {