diff src/lib-index/mail-index.c @ 12009:706f30fa4028

lib-index: Give a clearer error message for syscall failing with EFBIG.
author Timo Sirainen <tss@iki.fi>
date Wed, 18 Aug 2010 16:24:13 +0100
parents 038f25c02bb7
children 8af455e61dad
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Wed Aug 18 16:21:04 2010 +0100
+++ b/src/lib-index/mail-index.c	Wed Aug 18 16:24:13 2010 +0100
@@ -840,8 +840,10 @@
 			errstr = eacces_error_get(function, filepath);
 		return mail_index_set_error(index, "%s", errstr);
 	} else {
-		return mail_index_set_error(index, "%s failed with file %s: %m",
-					    function, filepath);
+		const char *suffix = errno != EFBIG ? "" :
+			" (process was started with ulimit -f limit)";
+		return mail_index_set_error(index, "%s failed with file %s: "
+					    "%m%s", function, filepath, suffix);
 	}
 }