comparison src/lspst.c @ 167:40e9de445038

improve consistency checking when fetching items from the pst file. avoid putting mixed item types into the same output folder.
author Carl Byington <carl@five-ten-sg.com>
date Wed, 18 Mar 2009 22:31:18 -0700
parents ab384fed78c5
children 6954d315aaa8
comparison
equal deleted inserted replaced
166:55d4f17a35f2 167:40e9de445038
9 #include "define.h" 9 #include "define.h"
10 10
11 struct file_ll { 11 struct file_ll {
12 char *dname; 12 char *dname;
13 int32_t stored_count; 13 int32_t stored_count;
14 int32_t email_count; 14 int32_t item_count;
15 int32_t skip_count; 15 int32_t skip_count;
16 int32_t type; 16 int32_t type;
17 }; 17 };
18 18
19 19
27 27
28 28
29 void create_enter_dir(struct file_ll* f, pst_item *item) 29 void create_enter_dir(struct file_ll* f, pst_item *item)
30 { 30 {
31 pst_convert_utf8(item, &item->file_as); 31 pst_convert_utf8(item, &item->file_as);
32 f->email_count = 0; 32 f->item_count = 0;
33 f->skip_count = 0; 33 f->skip_count = 0;
34 f->type = item->type; 34 f->type = item->type;
35 f->stored_count = (item->folder) ? item->folder->email_count : 0; 35 f->stored_count = (item->folder) ? item->folder->item_count : 0;
36 f->dname = (char*) xmalloc(strlen(item->file_as.str)+1); 36 f->dname = (char*) xmalloc(strlen(item->file_as.str)+1);
37 strcpy(f->dname, item->file_as.str); 37 strcpy(f->dname, item->file_as.str);
38 } 38 }
39 39
40 40