Skip to content

Commit 980529a

Browse files
authored
Add error handling for file copy operation
Replace commented out fs::copy with error handling.
1 parent 5ce9fde commit 980529a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ fn process_components(
353353
if quality.completeness >= completeness_cutoff {
354354
let bin_path = bindir.join(format!("{}.{}", binname, format));
355355
let final_path = resultdir.join(format!("{}.fasta", binname));
356-
fs::copy(&bin_path, &final_path).ok();
356+
// fs::copy(&bin_path, &final_path).ok();
357+
if let Err(e) = fs::copy(&bin_path, &final_path) {
358+
error!("Failed to copy from {:?} to {:?}: {}", bin_path, final_path, e);
359+
}
357360
}
358361
}
359362
return Ok(());

0 commit comments

Comments
 (0)