mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
change clear_output_folder position to prevent extra write operations
This commit is contained in:
parent
722f472e46
commit
9a64995bf5
1 changed files with 4 additions and 1 deletions
|
|
@ -247,6 +247,10 @@ async fn main() -> Result<()> {
|
|||
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
||||
.await?;
|
||||
|
||||
// cleanup `output_folder` only if the torrent is resolved
|
||||
// to prevent extra write operations on the next iteration
|
||||
preload.clear_output_folder(&i)?;
|
||||
|
||||
if config.debug {
|
||||
println!("\t\t\tadd `{i}` to index.")
|
||||
}
|
||||
|
|
@ -260,7 +264,6 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
preload.clear_output_folder(&i)?;
|
||||
}
|
||||
}
|
||||
if config.debug {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue