Skip to content

Commit 5141ba3

Browse files
authored
In provenance tracking, process the last file instead of the first file (#104)
This makes it more robust to the case where two mapping jsons are produced.
1 parent 18e8a63 commit 5141ba3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,10 @@ pub fn parse_path(path: &PathBuf, config: ParseConfig) -> anyhow::Result<ParseOu
829829
filename_pattern: &str,
830830
directory_name: &str,
831831
) -> String {
832+
// get the last file that include the filename_pattern in the output
832833
output
833834
.iter()
835+
.rev()
834836
.find(|(path, _)| {
835837
path.to_string_lossy()
836838
.contains(&format!("{}/{}", directory_name, filename_pattern))

0 commit comments

Comments
 (0)