diff options
Diffstat (limited to 'Swiften/VCards/VCardFileStorage.cpp')
| -rw-r--r-- | Swiften/VCards/VCardFileStorage.cpp | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/Swiften/VCards/VCardFileStorage.cpp b/Swiften/VCards/VCardFileStorage.cpp index cd5cc9c..476fde1 100644 --- a/Swiften/VCards/VCardFileStorage.cpp +++ b/Swiften/VCards/VCardFileStorage.cpp @@ -48,6 +48,7 @@ VCardFileStorage::VCardFileStorage(boost::filesystem::path dir) : vcardsPath(dir  }  boost::shared_ptr<VCard> VCardFileStorage::getVCard(const JID& jid) const { +	boost::shared_ptr<VCard> result;  	try {  		boost::filesystem::path vcardPath(getVCardPath(jid));  		if (boost::filesystem::exists(vcardPath)) { @@ -57,16 +58,14 @@ boost::shared_ptr<VCard> VCardFileStorage::getVCard(const JID& jid) const {  			VCardParser parser;  			PayloadParserTester tester(&parser);  			tester.parse(data.toString()); -			return boost::dynamic_pointer_cast<VCard>(parser.getPayload()); -		} -		else { -			return boost::shared_ptr<VCard>(); +			result = boost::dynamic_pointer_cast<VCard>(parser.getPayload());  		}  	}  	catch (const boost::filesystem::filesystem_error& e) {  		std::cerr << "ERROR: " << e.what() << std::endl; -		return boost::shared_ptr<VCard>();  	} +	getAndUpdatePhotoHash(jid, result); +	return result;  }  void VCardFileStorage::setVCard(const JID& jid, VCard::ref v) { | 
 Swift
 Swift