documented file_rename_failed_alert and file_renamed_alert. they were previously not documented. Fixed bug where the storage would be left in an error state (and eventually pause the torrent) when a rename_file() failed. The error is now only reported back through the alert

This commit is contained in:
Arvid Norberg
2009-05-07 06:41:41 +00:00
parent bc20af9375
commit 838df44184
5 changed files with 51 additions and 7 deletions

View File

@@ -4587,6 +4587,42 @@ generated and the torrent is paused.
std::string msg;
};
file_renamed_alert
------------------------
This is posted as a response to a ``torrent_handle::rename_file`` call, if the rename
operation succeeds.
::
struct file_renamed_alert: torrent_alert
{
// ...
std::string name;
int index;
};
The ``index`` member refers to the index of the file that was renamed,
``name`` is the new name of the file.
file_rename_failed_alert
------------------------
This is posted as a response to a ``torrent_handle::rename_file`` call, if the rename
operation failed.
::
struct file_rename_failed_alert: torrent_alert
{
// ...
int index;
error_code error;
};
The ``index`` member refers to the index of the file that was supposed to be renamed,
``error`` is the error code returned from the filesystem.
tracker_announce_alert
----------------------