From c45cf39fd2ec8dfd6c6d69b4300f6496703b260d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 4 Jan 2010 20:17:12 +0200 Subject: [PATCH] * mu-maildir: make max file size 32Mb; ignore too big files, but do not raise an error --- src/mu-maildir.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mu-maildir.c b/src/mu-maildir.c index 829cf7df..d4b82fc6 100644 --- a/src/mu-maildir.c +++ b/src/mu-maildir.c @@ -29,7 +29,7 @@ #include "mu-maildir.h" -#define MU_MAILDIR_WALK_MAX_FILE_SIZE (15*1000*1000) +#define MU_MAILDIR_WALK_MAX_FILE_SIZE (32*1000*1000) #define MU_MAILDIR_NOINDEX_FILE ".noindex" @@ -212,7 +212,7 @@ process_file (const char* fullpath, MuMaildirWalkMsgCallback cb, void *data) if (G_UNLIKELY(statbuf.st_size > MU_MAILDIR_WALK_MAX_FILE_SIZE)) { g_warning ("ignoring because bigger than %d bytes: %s", MU_MAILDIR_WALK_MAX_FILE_SIZE, fullpath); - return MU_ERROR; + return MU_OK; /* not an error */ } result = (cb)(fullpath,statbuf.st_mtime,data); @@ -501,7 +501,8 @@ mu_maildir_clear_links (const gchar* path) dir = opendir (path); if (!dir) { - g_warning ("failed to open %s: %s", path, strerror(errno)); + g_warning ("failed to open %s: %s", path, + strerror(errno)); return FALSE; }