maildir-list.c revision 7c424aa51c956c628e3512055841aa2f9eef4833
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "hostpid.h"
#include "unlink-directory.h"
#include "imap-match.h"
#include "subscription-file/subscription-file.h"
#include "maildir-index.h"
#include "maildir-storage.h"
#include <dirent.h>
struct find_subscribed_context {
void *context;
};
static enum mailbox_flags
{
/* no cur/ directory - broken */
return 0;
}
if (cur_stamp != index_stamp) {
/* changes in cur directory */
return MAILBOX_MARKED;
}
/* no new/ directory - broken */
return 0;
}
}
static enum mailbox_flags
{
const char *path;
hostpid_init();
/* first try to use .imap.index-hostname */
/* fallback to .imap.index */
}
/* error, or index simply isn't created yet */
"stat(%s) failed: %m", path);
}
return 0;
}
}
{
struct imap_match_glob *glob;
struct dirent *d;
enum mailbox_flags flags;
int failed, found_inbox;
return FALSE;
}
if (fname[0] != '.')
continue;
/* skip . and .. */
continue;
/* make sure the mask matches - dirs beginning with ".."
should be deleted and we always want to check those. */
continue;
continue;
/* make sure it's a directory */
continue; /* just deleted, ignore */
"stat(%s) failed: %m", path);
break;
}
continue;
/* this mailbox is in the middle of being deleted,
or the process trying to delete it had died.
delete it ourself if it's been there longer than
one hour */
continue;
}
found_inbox = TRUE;
t_push();
t_pop();
}
/* .INBOX directory doesn't exist yet, but INBOX still exists */
}
return !failed;
}
void *context)
{
enum mailbox_flags flags;
else {
else
}
return TRUE;
}
{
struct find_subscribed_context ctx;
return FALSE;
return TRUE;
}