diff --git a/ChangeLog b/ChangeLog index ffe2b7ab8..22a3658ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * make files deleted alert non-discardable * make built-in sha functions not conflict with libcrypto * improve web seed hash failure case * improve DHT lookup times diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index 3d68ff2e0..c98c3f4fc 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -713,6 +713,7 @@ namespace libtorrent const static int static_category = alert::storage_notification; virtual std::string message() const { return torrent_alert::message() + " deleted"; } + virtual bool discardable() const { return false; } sha1_hash info_hash; }; @@ -737,6 +738,7 @@ namespace libtorrent return torrent_alert::message() + " torrent deletion failed: " + error.message(); } + virtual bool discardable() const { return false; } error_code error; diff --git a/src/torrent.cpp b/src/torrent.cpp index ba47daa64..d131a32cc 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3591,13 +3591,11 @@ namespace libtorrent if (ret != 0) { - if (alerts().should_post()) - alerts().post_alert(torrent_delete_failed_alert(get_handle(), j.error)); + alerts().post_alert(torrent_delete_failed_alert(get_handle(), j.error)); } else { - if (alerts().should_post()) - alerts().post_alert(torrent_deleted_alert(get_handle(), m_torrent_file->info_hash())); + alerts().post_alert(torrent_deleted_alert(get_handle(), m_torrent_file->info_hash())); } }