Mercurial > dovecot > original-hg > dovecot-1.2
view src/lib-storage/mail-error.c @ 9595:166a188f9165 HEAD
mbox: Fields weren't being added to cache file during message saving.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 30 Jul 2010 16:55:58 +0100 |
parents | 00cd9aacd03c |
children |
line wrap: on
line source
/* Copyright (c) 2007-2010 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "eacces-error.h" #include "mail-error.h" bool mail_error_from_errno(enum mail_error *error_r, const char **error_string_r) { if (ENOACCESS(errno)) { *error_r = MAIL_ERROR_PERM; *error_string_r = MAIL_ERRSTR_NO_PERMISSION; } else if (ENOSPACE(errno)) { *error_r = MAIL_ERROR_NOSPACE; *error_string_r = MAIL_ERRSTR_NO_SPACE; } else if (ENOTFOUND(errno)) { *error_r = MAIL_ERROR_NOTFOUND; *error_string_r = errno != ELOOP ? "Not found" : "Directory structure is broken"; } else { return FALSE; } return TRUE; } const char *mail_error_eacces_msg(const char *func, const char *path) { return eacces_error_get(func, path); } const char *mail_error_create_eacces_msg(const char *func, const char *path) { return eacces_error_get_creating(func, path); }