summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-11-01 23:36:31 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-11-01 23:36:31 (GMT)
commit95061b30ccc2e63e162e3510e6de5c0292c0a7dd (patch)
tree6cd2c8600a86f632a193872a5c2ded0cc394f787
parentf3abd08a4134c550179e485b98260a1d72ea032f (diff)
downloadlibkolabxml-95061b30ccc2e63e162e3510e6de5c0292c0a7dd.tar.gz
Made the filename mandatory.
-rw-r--r--src/kolabconversions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kolabconversions.h b/src/kolabconversions.h
index 210cd20..583f56f 100644
--- a/src/kolabconversions.h
+++ b/src/kolabconversions.h
@@ -291,6 +291,9 @@ std::string serializeObject <Kolab::File> (const Kolab::File &file, const std::s
// WARNING("missing last_modification_date, fallback to current timestamp");
lastModificationDate = fromDateTime(timestamp());
}
+ if (file.file().label().empty()) {
+ ERROR("missing filename");
+ }
KolabXSD::File n(uid, getProductId(prod), created, lastModificationDate, fromAttachment(file.attachment()));
@@ -547,6 +550,9 @@ boost::shared_ptr<Kolab::File> deserializeObject <Kolab::File> (const std::strin
}
const Kolab::Attachment &attachment = toAttachment(file->attachment());
+ if (attachment.label().empty()) {
+ ERROR("Missing filename");
+ }
if (!attachment.isValid()) {
ERROR("invalid attachment");
}