maildir-open.c revision db1ee4a91a6572602302115e02146b29adea3a54
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "istream.h"
#include "maildir-index.h"
#include "mail-index-data.h"
#include "mail-index-util.h"
#include <unistd.h>
#include <fcntl.h>
struct mail_index_record *rec,
{
const char *path;
int fd = -1;
return -1;
/* probably in new/ dir */
return -1;
}
}
if (fd == -1) {
if (fd == -1) {
return -1;
}
return -1;
}
}
return fd;
}
struct mail_index_record *rec,
{
const char *fname;
/* check for inconsistency here, to avoid extra error messages */
if (index->inconsistent)
return NULL;
/* file is either renamed or deleted. sync the maildir and
see which one. if file appears to be renamed constantly,
don't try to open it more than 10 times. */
return NULL;
}
if (!found) {
/* syncing didn't find it, it's deleted */
return NULL;
}
if (fd == -1)
return NULL;
}
if (internal_date != NULL) {
}
}
if (index->mail_read_mmaped) {
MAIL_MMAP_BLOCK_SIZE, 0, 0, TRUE);
} else {
}
}