author | eilers <eilers> | 2004-11-19 11:05:19 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-11-19 11:05:19 (UTC) |
commit | 362e353e4ee43a5aa37fd4c264ad0b40bbd0098b (patch) (unidiff) | |
tree | 52de09cbe81e5105cfdef9b606c10e4239cef814 /library/backend | |
parent | 6b1a6e3bf5d012e517c9668501f030d8c660b537 (diff) | |
download | opie-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..
-rw-r--r-- | library/backend/vobject.cpp | 6 |
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 | |||
@@ -1352,13 +1352,15 @@ DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list) | |||
1352 | } | 1352 | } |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) | 1355 | DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) |
1356 | { | 1356 | { |
1357 | const char *type = vObjectName( o ); | 1357 | const char *type = vObjectName( o ); |
1358 | if ( strcmp( type, "TYPE" ) == 0 ) | 1358 | if ( strcmp( type, "type" ) == 0 || |
1359 | type = vObjectStringZValue( o ); | 1359 | strcmp( type, "TYPE" ) == 0 || |
1360 | strcmp( type, "Type" ) == 0 ) | ||
1361 | type = vObjectStringZValue( o ); | ||
1360 | return type; | 1362 | return type; |
1361 | } | 1363 | } |
1362 | 1364 | ||
1363 | 1365 | ||
1364 | // end of source file vobject.c | 1366 | // end of source file vobject.c |