Skip to content

Commit

Permalink
add warning and skip if a file cannot be found during a merge. #89
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Feb 17, 2025
1 parent d517456 commit 346df5d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gtars/src/uniwig/writing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ pub fn write_combined_files(
"{}{}_{}.{}",
bwfileheader, chrom.chrom, location, output_type
);
inputs.push(file_name);
let cloned_file_name = file_name.clone();
let path = Path::new(&cloned_file_name);
if path.exists() { // Check if the file exists
inputs.push(file_name);
} else {
eprintln!("Warning: Temp File '{}' does not exist. Skipping.", file_name);
}
}

for input_file in inputs {
Expand Down

0 comments on commit 346df5d

Please sign in to comment.