diff options
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/evolution-vcard-importer.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/addressbook/backend/ebook/evolution-vcard-importer.c b/addressbook/backend/ebook/evolution-vcard-importer.c index 2864627a39..7a3a56fbd6 100644 --- a/addressbook/backend/ebook/evolution-vcard-importer.c +++ b/addressbook/backend/ebook/evolution-vcard-importer.c @@ -113,7 +113,9 @@ process_item_fn (EvolutionImporter *importer, } static char *supported_extensions[3] = { - ".vcf", ".gcrd", NULL + ".vcf", + ".gcrd", + NULL }; /* Actually check the contents of this file */ @@ -154,6 +156,12 @@ support_format_fn (EvolutionImporter *importer, int i; ext = strrchr (filename, '.'); + + /* Require an extension in order to strcmp with our list of + supported extensions */ + if (ext == NULL) + return FALSE; + for (i = 0; supported_extensions[i] != NULL; i++) { if (strcmp (supported_extensions[i], ext) == 0) return check_file_is_vcard (filename); |