if (buffy)
examine_mailboxes(menu, &state);
else
- examine_directory(menu, &state, NULL, NULL);
+ {
+ if (examine_directory(menu, &state, NULL, NULL) == -1)
+ break;
+ }
init_menu(&state, menu, title, sizeof(title), buffy);
}
break;
FILE *fp = fdopen(fd, "w+");
- if (unlink(name) && (errno != ENOENT))
+ if ((unlink(name) != 0) && (errno != ENOENT))
+ {
+ mutt_file_fclose(&fp);
return NULL;
+ }
MuttLogger(0, file, line, func, 1, "created temp file '%s'\n", name);
return fp;
int count;
int attempt;
struct stat sb = { 0 }, prev_sb = { 0 };
- int r = 0;
struct flock lck;
sleep(1);
}
- /* release any other locks obtained in this routine */
- if (r != 0)
- {
- lck.l_type = F_UNLCK;
- fcntl(fd, F_SETLK, &lck);
- }
-
- return r;
+ return 0;
}
/**