fixed move_stororage to handle the case where it fails

This commit is contained in:
Arvid Norberg
2009-05-11 21:18:09 +00:00
parent 136f101449
commit 92f42eb23c
4 changed files with 57 additions and 4 deletions

View File

@@ -2002,7 +2002,8 @@ drop while copying the file.
Since disk IO is performed in a separate thread, this operation is also asynchronous.
Once the operation completes, the ``storage_moved_alert`` is generated, with the new
path as the message.
path as the message. If the move fails for some reason, ``storage_moved_failed_alert``
is generated instead, containing the error message.
rename_file()
-------------
@@ -4974,6 +4975,21 @@ the storage.
};
storage_moved_failed_alert
--------------------------
The ``storage_moved_failed_alert`` is generated when an attempt to move the storage
(via torrent_handle::move_storage()) fails.
::
struct storage_moved_failed_alert: torrent_alert
{
// ...
error_code error;
};
torrent_paused_alert
--------------------