From c32ebb8d9fb610e836172c533c76b7e908e1e4b6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 31 Aug 2008 12:35:25 +0000 Subject: [PATCH] - Another fix for boost v1.36 --- src/createtorrent_imp.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/createtorrent_imp.cpp b/src/createtorrent_imp.cpp index d6774537a..5c1bf9df1 100644 --- a/src/createtorrent_imp.cpp +++ b/src/createtorrent_imp.cpp @@ -128,18 +128,6 @@ void createtorrent::on_addURLSeed_button_clicked(){ // Subfunction to add files to a torrent_info structure // Written by Arvid Norberg (libtorrent Author) -//void add_files(torrent_info& t, path const& p, path const& l){ -// qDebug("p: %s, l: %s, l.leaf(): %s", p.string().c_str(), l.string().c_str(), l.leaf().c_str()); -// path f(p / l); -// if (is_directory(f)){ -// for (directory_iterator i(f), end; i != end; ++i) -// add_files(t, p, l / i->leaf()); -// }else{ -// qDebug("Adding %s", l.string().c_str()); -// t.add_file(l, file_size(f)); -// } -//} - void add_files(torrent_info& t, path const& p, path const& l){ using boost::filesystem::path; using boost::filesystem::directory_iterator; @@ -244,7 +232,11 @@ void torrentCreatorThread::run() { ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary); // Adding files to the torrent path full_path = complete(path(input_path.toUtf8().data())); +#if BOOST_VERSION < 103600 add_files(*t, full_path.branch_path(), full_path.leaf()); +#else + add_files(*t, full_path.branch_path(), full_path.filename()); +#endif if(abort) return; // Set piece size t->set_piece_size(piece_size);