replaced boost.filesystem with custom functions (improves efficiency and drops unnecessary dependencies and improves libtorrent portability)
This commit is contained in:
@@ -35,13 +35,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/hasher.hpp"
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
#include "setup_transfer.hpp"
|
||||
|
||||
using boost::filesystem::remove_all;
|
||||
|
||||
void test_lsd()
|
||||
{
|
||||
using namespace libtorrent;
|
||||
@@ -122,18 +119,18 @@ void test_lsd()
|
||||
int test_main()
|
||||
{
|
||||
using namespace libtorrent;
|
||||
using namespace boost::filesystem;
|
||||
|
||||
// in case the previous run was terminated
|
||||
try { remove_all("./tmp1_lsd"); } catch (std::exception&) {}
|
||||
try { remove_all("./tmp2_lsd"); } catch (std::exception&) {}
|
||||
try { remove_all("./tmp3_lsd"); } catch (std::exception&) {}
|
||||
error_code ec;
|
||||
remove_all("./tmp1_lsd", ec);
|
||||
remove_all("./tmp2_lsd", ec);
|
||||
remove_all("./tmp3_lsd", ec);
|
||||
|
||||
test_lsd();
|
||||
|
||||
remove_all("./tmp1_lsd");
|
||||
remove_all("./tmp2_lsd");
|
||||
remove_all("./tmp3_lsd");
|
||||
remove_all("./tmp1_lsd", ec);
|
||||
remove_all("./tmp2_lsd", ec);
|
||||
remove_all("./tmp3_lsd", ec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user