diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:18:17 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-19 20:17:52 (GMT) |
commit | e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd (patch) | |
tree | 152859d7c7120df7cda802869ba01192052e6001 /Swiften/FileTransfer | |
parent | a216cabfbd9ee0244e70d1eb6093986e430c9ef1 (diff) | |
download | swift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.zip swift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.tar.bz2 |
Update to boost.filesystem v3.
Source should still compile against v2.
Diffstat (limited to 'Swiften/FileTransfer')
-rw-r--r-- | Swiften/FileTransfer/FileTransferManagerImpl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.cpp b/Swiften/FileTransfer/FileTransferManagerImpl.cpp index 853738c..7fd8b07 100644 --- a/Swiften/FileTransfer/FileTransferManagerImpl.cpp +++ b/Swiften/FileTransfer/FileTransferManagerImpl.cpp @@ -103,7 +103,12 @@ boost::optional<JID> FileTransferManagerImpl::highestPriorityJIDSupportingFileTr } OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(const JID& to, const boost::filesystem::path& filepath, const std::string& description, boost::shared_ptr<ReadBytestream> bytestream) { +#if BOOST_FILESYSTEM_VERSION == 2 // TODO: Delete this when boost 1.44 becomes a minimum requirement, and we no longer need v2 std::string filename = filepath.filename(); +#else + std::string filename = filepath.filename().string(); +#endif + boost::uintmax_t sizeInBytes = boost::filesystem::file_size(filepath); boost::posix_time::ptime lastModified = boost::posix_time::from_time_t(boost::filesystem::last_write_time(filepath)); return createOutgoingFileTransfer(to, filename, description, sizeInBytes, lastModified, bytestream); |