X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a4f7db8d70e4a1f285fb8345d3c9173b4a0cbe17..d6e398f9c1aa774ecc336877ac1c465b8f9b942b:/uip/new.c diff --git a/uip/new.c b/uip/new.c index a0683dd2..8d235b17 100644 --- a/uip/new.c +++ b/uip/new.c @@ -95,6 +95,7 @@ get_msgnums(char *folder, char *sequences[]) char name[NAMESZ], field[BUFSIZ]; char *cp; char *msgnums = NULL, *this_msgnums, *old_msgnums; + int failed_to_lock = 0; m_getfld_state_t gstate = 0; /* copied from seq_read.c:seq_public */ @@ -112,11 +113,10 @@ get_msgnums(char *folder, char *sequences[]) if (seqfile == NULL) return NULL; - if ((fp = lkfopendata (seqfile, "r")) == NULL) { + if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) { free(seqfile); - if (errno == EACCES || errno == EAGAIN || errno == EWOULDBLOCK) { - /* Failed to lock sequence file. */ + if (failed_to_lock) { adios (seqfile, "failed to lock"); } else { return NULL;