Fix resource leaks and minor issues

- Close pipe fds on fork failure in ExecFile::execute
- Add exception-safe fclose in cmd_file_append via try/catch
- Add overflow guards before K/M/G bit shifts in parse_whole_value
- Fix %u format for int* in sscanf (change to %d)
- Fix typo "atter"→"after" in error message
This commit is contained in:
sirus20x6
2026-03-13 20:28:38 -05:00
committed by Jari Sundell
parent 6f27159627
commit 0aaa470053
5 changed files with 24 additions and 9 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ Download::set_root_directory(const std::string& path) {
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 atter the files have been moved.");
throw torrent::input_error("Cannot change the directory of an open download after the files have been moved.");
}
control->core()->download_list()->close_directly(this);