diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index 16e274834..996d7427e 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -441,6 +441,11 @@ QString QTorrentHandle::root_path() const { return save_path(); } +bool QTorrentHandle::has_error() const { + Q_ASSERT(h.is_valid()); + return h.status().error.empty(); +} + // // Setters // @@ -464,6 +469,7 @@ void QTorrentHandle::pause() { void QTorrentHandle::resume() { Q_ASSERT(h.is_valid()); + if(has_error()) h.clear_error(); h.auto_managed(true); h.resume(); } diff --git a/src/qtorrenthandle.h b/src/qtorrenthandle.h index 7056afedf..19fcf00ef 100644 --- a/src/qtorrenthandle.h +++ b/src/qtorrenthandle.h @@ -127,6 +127,7 @@ class QTorrentHandle { bool priv() const; bool first_last_piece_first() const; QString root_path() const; + bool has_error() const; // // Setters