Add the download to the stopped view when a hash check contradicts d.complete.

Setting d.state alone left it in the started view, where d.start cannot restore it.
This commit is contained in:
noctuum
2026-08-28 06:32:53 +05:00
committed by Jari Sundell
parent e4e858cc40
commit 21019fde41
+1 -1
View File
@@ -554,7 +554,7 @@ DownloadList::hash_done(Download* download) {
// If the download was previously completed but the files were
// f.ex deleted, then we clear the state and complete.
if (rpc::call_command_value("d.complete", rpc::make_target(download)) && !download->is_done()) {
rpc::call_command("d.state.set", (int64_t)0, rpc::make_target(download));
set_state_stopped(download);
download->set_message("Download registered as completed, but hash check returned unfinished chunks.");
}