From 6b132fe48a5fe75643cbff31b26f3d78e66da796 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 29 Aug 2002 12:04:34 +0000 Subject: Change the case sensitive search of subject to expect case insensitive 2002-08-29 Not Zed * tests/folder/test3.c: Change the case sensitive search of subject to expect case insensitive results, as the behaviour has changed. (main): Made the search content before sync nonfatal. its something that needs to be fixed but not practical concern in evolution. * camel-block-file.c (block_file_validate_root): Only spit out the invalid root warnings if the file isn't empty. * camel-text-index.c (text_index_compress_nosync): Swap the path as well when we compress. * camel-mime-parser.c (folder_scan_content): Treat the end of file as a boundary if we're scanning From lines, and drop the last \n. (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof. (folder_scan_init_with_stream): Similar. (folder_read): Handle eof, and set eof on 0 read. (folder_seek): Dont pre-read after a seek, and reset eof flag. (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs anymore. (camel_mime_parser_init_with_stream): Same. * providers/local/camel-mbox-summary.c (camel_mbox_summary_sync_mbox): Add a \n to end of content of each message, not at start. * providers/local/camel-mbox-folder.c (mbox_append_message): Instead of appending "\nFrom " to a mailbox, start with "From ", and append a \n after the message always. For better mutt/elm compatability. Also, unlock after we've stat'd. (mbox_append_message): Set the message's from_pos exactly as the mbox size. svn path=/trunk/; revision=17921 --- camel/camel-block-file.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'camel/camel-block-file.c') diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c index bc485dd6e5..e61320b2ea 100644 --- a/camel/camel-block-file.c +++ b/camel/camel-block-file.c @@ -93,10 +93,11 @@ block_file_validate_root(CamelBlockFile *bs) { struct stat st; CamelBlockRoot *br; + int s; br = bs->root; - fstat(bs->fd, &st); + s = fstat(bs->fd, &st); d(printf("Validate root: '%s'\n", bs->path)); d(printf("version: %.8s (%.8s)\n", bs->root->version, bs->version)); @@ -117,15 +118,17 @@ block_file_validate_root(CamelBlockFile *bs) || st.st_size != br->last || br->free > st.st_size || (br->flags & CAMEL_BLOCK_FILE_SYNC) == 0) { - g_warning("Invalid root: '%s'", bs->path); - g_warning("version: %.8s (%.8s)", bs->root->version, bs->version); - g_warning("block size: %d (%d)%s", br->block_size, bs->block_size, - br->block_size != bs->block_size ? " BAD":" OK"); - g_warning("free: %ld (%d add size < %ld)%s", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size, - (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK"); - g_warning("last: %ld (%d and size: %ld)%s", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size, - (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK"); - g_warning("flags: %s", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"); + if (s != -1 && st.st_size > 0) { + g_warning("Invalid root: '%s'", bs->path); + g_warning("version: %.8s (%.8s)", bs->root->version, bs->version); + g_warning("block size: %d (%d)%s", br->block_size, bs->block_size, + br->block_size != bs->block_size ? " BAD":" OK"); + g_warning("free: %ld (%d add size < %ld)%s", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size, + (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK"); + g_warning("last: %ld (%d and size: %ld)%s", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size, + (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK"); + g_warning("flags: %s", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"); + } return -1; } -- cgit v1.2.3