forked from premiere/premiere-libtorrent
fall back to copy+remove if rename_file fails
This commit is contained in:
parent
6e80f1f615
commit
c1b0c70c23
|
@ -1,3 +1,4 @@
|
|||
* fall back to copy+remove if rename_file fails
|
||||
* improve handling of filesystems not supporting fallocate()
|
||||
* force-proxy no longer disables DHT
|
||||
* improve connect-boost feature, to make new torrents quickly connect peers
|
||||
|
|
|
@ -778,9 +778,18 @@ namespace libtorrent
|
|||
|
||||
if (ec)
|
||||
{
|
||||
ec.file = index;
|
||||
ec.operation = storage_error::rename;
|
||||
return;
|
||||
ec.ec.clear();
|
||||
copy_file(old_name, new_path, ec.ec);
|
||||
|
||||
if (ec)
|
||||
{
|
||||
ec.file = index;
|
||||
ec.operation = storage_error::rename;
|
||||
return;
|
||||
}
|
||||
|
||||
error_code ignore;
|
||||
remove(old_name, ignore);
|
||||
}
|
||||
}
|
||||
else if (ec.ec)
|
||||
|
|
Loading…
Reference in New Issue