merged move_storage fix from RC_0_16

This commit is contained in:
Arvid Norberg 2013-10-28 05:07:55 +00:00
parent 4459fd89f7
commit aef04aca5b
1 changed files with 8 additions and 0 deletions

View File

@ -822,6 +822,14 @@ namespace libtorrent
{
error_code ec;
recursive_copy(old_path, new_path, ec);
if (ec == boost::system::errc::no_such_file_or_directory)
{
// it's a bit weird that rename() would not return
// ENOENT, but the file still wouldn't exist. But,
// in case it does, we're done.
ec.clear();
break;
}
if (ec)
{
set_error(old_path, ec);