aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-05-30 08:50:23 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-30 08:50:23 +0800
commit0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3 (patch)
tree61f38b532c11c6e7a8c470bbdb6bb9f60971ca13 /camel/providers
parent7c4626c00f27146eef32f98a8880ff8fa70269b8 (diff)
downloadgsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar.gz
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar.bz2
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar.lz
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar.xz
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.tar.zst
gsoc2013-evolution-0dae22ec2f2ee3fc63c08075cf220d461ce8b5a3.zip
Make sure we copy messages which are still intact to the new folder.
2000-05-29 Not Zed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_expunge): Make sure we copy messages which are still intact to the new folder. (camel_mbox_summary_expunge): Update the frompos as well when moving the content. svn path=/trunk/; revision=3272
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c4
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c18
-rw-r--r--camel/providers/vee/camel-vee-folder.c2
3 files changed, 20 insertions, 4 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index ccf57f02b7..de7a7764ba 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -778,7 +778,9 @@ mbox_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *
}
if (camel_mime_parser_tell_start_from(parser) != info->frompos) {
- g_warning("Summary doesn't match the folder contents! eek!");
+ g_warning("Summary doesn't match the folder contents! eek!\n"
+ " expecting offset %d got %d", info->frompos,
+ camel_mime_parser_tell_start_from(parser));
errno = EINVAL;
goto fail;
}
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index 46b180e999..4ee38b24fc 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -300,7 +300,7 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset)
gtk_object_unref((GtkObject *)mp);
/* end of file - no content? */
printf("We radn out of file?\n");
- return 0;
+ return -1;
}
}
@@ -663,7 +663,8 @@ camel_mbox_summary_expunge(CamelMboxSummary *mbs)
info->info.content->pos,
info->info.content->endpos,
info->info.content->bodypos));
- if (copy_block(fd, fdout, info->info.content->bodypos, info->info.content->endpos - info->info.content->bodypos) == -1) {
+ if (copy_block(fd, fdout, info->info.content->bodypos,
+ info->info.content->endpos - info->info.content->bodypos) == -1) {
g_warning("Cannot copy data to output fd");
goto error;
}
@@ -675,9 +676,20 @@ camel_mbox_summary_expunge(CamelMboxSummary *mbs)
camel_mime_parser_drop_step(mp);
camel_mime_parser_drop_step(mp);
} else {
- d(printf("Nothing to do for this message\n"));
+ if (!quick) {
+ if (copy_block(fd, fdout, info->frompos,
+ info->info.content->endpos - info->frompos) == -1) {
+ g_warning("Cannot copy data to output fd");
+ goto error;
+ }
+ /* update from pos here? */
+ info->frompos += offset;
+ } else {
+ d(printf("Nothing to do for this message\n"));
+ }
}
if (!quick && info!=NULL && offset!=0) {
+ printf("offsetting content: %d\n", offset);
camel_folder_summary_offset_content(info->info.content, offset);
d(printf("pos = %d, endpos = %d, bodypos = %d\n",
info->info.content->pos,
diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c
index f2a28c7bb5..0d6abf17d2 100644
--- a/camel/providers/vee/camel-vee-folder.c
+++ b/camel/providers/vee/camel-vee-folder.c
@@ -173,6 +173,8 @@ folder_changed(CamelFolder *sub, int type, CamelVeeFolder *vf)
{
CamelException *ex;
+ printf("subfolder changed!!, re-searching\n");
+
ex = camel_exception_new();
vee_folder_build_folder(vf, sub, ex);
camel_exception_free(ex);