FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible)

This commit is contained in:
Christophe Dumez
2010-04-06 09:17:33 +00:00
parent 0cd5253857
commit 772028106e
7 changed files with 98 additions and 21 deletions

View File

@@ -40,6 +40,8 @@
#include <QPoint>
#include <libtorrent/torrent_info.hpp>
#include <libtorrent/torrent_handle.hpp>
using namespace libtorrent;
/* Miscellaneaous functions that can be useful */
@@ -68,6 +70,9 @@ public:
return x;
}
static QString truncateRootFolder(boost::intrusive_ptr<torrent_info> t);
static QString truncateRootFolder(torrent_handle h);
static bool sameFiles(QString path1, QString path2);
static void copyDir(QString src_path, QString dst_path);
// Introduced in v2.1.0 for backward compatibility