Skip to content

Commit

Permalink
fix: bad file descriptor (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi authored May 10, 2024
1 parent 9ad8b91 commit 29b149b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uplink/src/collector/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl DownloadState {
// Calculate deadline based on written time left
current.action.deadline = current.time_left.map(|t| Instant::now() + t);

let file = File::open(current.meta.download_path.as_ref().unwrap())?;
let file = File::options().append(true).open(current.meta.download_path.as_ref().unwrap())?;
let bytes_written = file.metadata()?.len() as usize;

remove_file(path)?;
Expand Down

0 comments on commit 29b149b

Please sign in to comment.