diff options
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/importers/evolution-ldif-importer.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index dee8e999c6..deae14c922 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2005-03-05 Sushma Rai <rsushma@novell.com> + + * importers/evolution-ldif-importer.c (ldif_import): Initialize gci->size to + the file size, which is used for indicationg the import progress. Fixes the + crash due to devide by zero, while importing more than fifty contacts. + 2005-08-03 Jules Colding <colding@omesc.com> * gui/component/addressbook-view.c: Added forward references to functions that were diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index b989fb5385..4d36ddcd63 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -618,7 +618,8 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im) gci->target = target; gci->book = book; gci->file = file; - gci->size = fseek(file, 0, SEEK_END); + fseek(file, 0, SEEK_END); + gci->size = ftell(file); fseek(file, 0, SEEK_SET); gci->dn_contact_hash = g_hash_table_new(g_str_hash, g_str_equal); |