Stop the download in close_directly() rather than leaving the state behind.

It closed the files while d.state and the started view still called it running.
This commit is contained in:
noctuum
2026-08-28 06:31:21 +05:00
committed by Jari Sundell
parent 60eb8f0383
commit e4e858cc40
3 changed files with 35 additions and 10 deletions
-1
View File
@@ -120,7 +120,6 @@ Download::set_root_directory(const std::string& path) {
!file_stat.update(file_list->front()->frozen_path().str()))) {
set_message("Cannot change the directory of an open download after the files have been moved.");
rpc::call_command("d.state.set", (int64_t)0, rpc::make_target(this));
control->core()->download_list()->close_directly(this);
throw torrent::input_error("Cannot change the directory of an open download after the files have been moved.");