summaryrefslogtreecommitdiff
path: root/library
authoreilers <eilers>2004-11-19 11:05:19 (UTC)
committer eilers <eilers>2004-11-19 11:05:19 (UTC)
commit362e353e4ee43a5aa37fd4c264ad0b40bbd0098b (patch) (side-by-side diff)
tree52de09cbe81e5105cfdef9b606c10e4239cef814 /library
parent6b1a6e3bf5d012e517c9668501f030d8c660b537 (diff)
downloadopie-362e353e4ee43a5aa37fd4c264ad0b40bbd0098b.zip
opie-362e353e4ee43a5aa37fd4c264ad0b40bbd0098b.tar.gz
opie-362e353e4ee43a5aa37fd4c264ad0b40bbd0098b.tar.bz2
Don't just allow "TYPE=<value>".. This makes the vcard import filter more
robust against unexpected typos..
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vobject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index 592d116..28b8bae 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1355,8 +1355,10 @@ DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
DLLEXPORT(const char *) vObjectTypeInfo(VObject *o)
{
const char *type = vObjectName( o );
- if ( strcmp( type, "TYPE" ) == 0 )
- type = vObjectStringZValue( o );
+ if ( strcmp( type, "type" ) == 0 ||
+ strcmp( type, "TYPE" ) == 0 ||
+ strcmp( type, "Type" ) == 0 )
+ type = vObjectStringZValue( o );
return type;
}