diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-06 15:48:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-11 21:53:43 (GMT) |
commit | 6f31cc8a329d15767d54511edd14339ac3dfdd7a (patch) | |
tree | d41bdb8af487fed788f7a9bc88b1ab08ff567272 /Swiften/VCards | |
parent | ebccdadcae24932b299a8612a9c6e0cdc4e00249 (diff) | |
download | swift-6f31cc8a329d15767d54511edd14339ac3dfdd7a.zip swift-6f31cc8a329d15767d54511edd14339ac3dfdd7a.tar.bz2 |
Added support for Entity Capabilities.
Resolves: #94
Diffstat (limited to 'Swiften/VCards')
-rw-r--r-- | Swiften/VCards/VCardFileStorage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/VCards/VCardFileStorage.cpp b/Swiften/VCards/VCardFileStorage.cpp index 66bae04..b4536f9 100644 --- a/Swiften/VCards/VCardFileStorage.cpp +++ b/Swiften/VCards/VCardFileStorage.cpp @@ -39,7 +39,12 @@ boost::shared_ptr<VCard> VCardFileStorage::getVCard(const JID& jid) const { void VCardFileStorage::setVCard(const JID& jid, boost::shared_ptr<VCard> v) { boost::filesystem::path vcardPath(getVCardPath(jid)); if (!boost::filesystem::exists(vcardPath.parent_path())) { - boost::filesystem::create_directories(vcardPath.parent_path()); + try { + boost::filesystem::create_directories(vcardPath.parent_path()); + } + catch (const boost::filesystem::filesystem_error& e) { + std::cerr << "ERROR: " << e.what() << std::endl; + } } boost::filesystem::ofstream file(getVCardPath(jid)); file << VCardSerializer().serializePayload(v); |