diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:18:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:33:59 (GMT) |
commit | 6856199274e9c5e581220fccf520b8f011519d17 (patch) | |
tree | 1929a1ea8f1d3b877fc8c928e9c3d23d9716ad82 /Swiften | |
parent | 4397df6b409ca84f63838fa635fc2abe8af80b71 (diff) | |
download | swift-contrib-6856199274e9c5e581220fccf520b8f011519d17.zip swift-contrib-6856199274e9c5e581220fccf520b8f011519d17.tar.bz2 |
Update to boost.filesystem v3.
Source should still compile against v2.
Diffstat (limited to 'Swiften')
-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); |