aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/importers/evolution-csv-importer.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/importers/evolution-csv-importer.c')
-rw-r--r--addressbook/importers/evolution-csv-importer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 1790c2b65c..034b1b3601 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -469,20 +469,20 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
GString *str;
char *buf;
- str = g_string_new("");
- if(!fgets(line, sizeof(line),f)) {
- g_string_free(str, TRUE);
- break;
+ while (!feof (f)) {
+ if(!fgets(line, sizeof(line),f))
+ break;
}
if(gci->count == 0 && importer != MOZILLA_IMPORTER) {
- if(!fgets(line, sizeof(line),f)) {
- g_string_free(str, TRUE);
- break;
+ while (!feof (f) ) {
+ if(!fgets(line, sizeof(line),f))
+ break;
}
gci->count ++;
}
-
+
+ str = g_string_new("");
str = g_string_append (str, line);
if(strlen(str->str) == 0) {