mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
wpath fix
This commit is contained in:
parent
1454a4d4c0
commit
062e4d2a8a
1 changed files with 54 additions and 54 deletions
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
a/*
|
||||
|
||||
Copyright (c) 2003, Arvid Norberg, Daniel Wallin
|
||||
All rights reserved.
|
||||
|
@ -255,7 +255,7 @@ namespace libtorrent
|
|||
template <class Path>
|
||||
void recursive_copy(Path const& old_path, Path const& new_path, std::string& error)
|
||||
{
|
||||
using boost::filesystem::directory_iterator;
|
||||
using boost::filesystem::basic_directory_iterator;
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
|
@ -263,7 +263,7 @@ namespace libtorrent
|
|||
if (is_directory(old_path))
|
||||
{
|
||||
create_directory(new_path);
|
||||
for (directory_iterator i(old_path), end; i != end; ++i)
|
||||
for (basic_directory_iterator<Path> i(old_path), end; i != end; ++i)
|
||||
{
|
||||
recursive_copy(i->path(), new_path / i->leaf(), error);
|
||||
if (!error.empty()) return;
|
||||
|
@ -281,13 +281,13 @@ namespace libtorrent
|
|||
template <class Path>
|
||||
void recursive_remove(Path const& old_path)
|
||||
{
|
||||
using boost::filesystem::directory_iterator;
|
||||
using boost::filesystem::basic_directory_iterator;
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
if (is_directory(old_path))
|
||||
{
|
||||
for (directory_iterator i(old_path), end; i != end; ++i)
|
||||
for (basic_directory_iterator<Path> i(old_path), end; i != end; ++i)
|
||||
recursive_remove(i->path());
|
||||
remove(old_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue