X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.cpp;h=3d4d319fd2dece36ef51a8d02525bf562a253bfc;hb=cdd1530fcf2b19be9187604deb6aa78fba091366;hp=f811e6116996f7b8e0ae8e55dc715be04b32ab00;hpb=c3caab2c7ab2b4256304e4d1687cf8d15394f31d;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index f811e61..3d4d319 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -35,6 +35,24 @@ ContactLoadStatus ContactDataObject::LoadFile(wxString Filename){ } // Check that the vCard is a valid vCard 4.0 file. + + vCard vCard4FormatCheck; + + vCard4FormatCheck.LoadFile(Filename); + + if (vCard4FormatCheck.Get("VERSION") != wxT("4.0")){ + + return CONTACTLOAD_FILEINVALIDFORMAT; + + } + + // Check that the vCard meets the base specification. + + if (!vCard4FormatCheck.MeetBaseSpecification()){ + + return CONTACTLOAD_FILEBASESPECFAIL; + + }