diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-17 19:26:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-17 19:26:21 (GMT) |
commit | 6fd3078f8f512c74bfc54c3d31d6446098088a69 (patch) | |
tree | 5db18c9405c83887142d0dc249236cc8d225378e /Swiften/Avatars | |
parent | 9e5cc663f5018c03fd2657284dfdd5e522d55cbf (diff) | |
download | swift-contrib-6fd3078f8f512c74bfc54c3d31d6446098088a69.zip swift-contrib-6fd3078f8f512c74bfc54c3d31d6446098088a69.tar.bz2 |
Catch exceptions from create_dir.
Diffstat (limited to 'Swiften/Avatars')
-rw-r--r-- | Swiften/Avatars/AvatarFileStorage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Avatars/AvatarFileStorage.cpp b/Swiften/Avatars/AvatarFileStorage.cpp index c323c0e..a0ebd21 100644 --- a/Swiften/Avatars/AvatarFileStorage.cpp +++ b/Swiften/Avatars/AvatarFileStorage.cpp @@ -12,7 +12,12 @@ namespace Swift { AvatarFileStorage::AvatarFileStorage(const boost::filesystem::path& path) : path_(path) { - boost::filesystem::create_directory(path_); + try { + boost::filesystem::create_directory(path_); + } + catch (const boost::filesystem::filesystem_error& e) { + std::cerr << "ERROR: " << e.what() << std::endl; + } } bool AvatarFileStorage::hasAvatar(const String& hash) const { |