From e50e167a84198ac77c9e9252a6cce38cd47f63b4 Mon Sep 17 00:00:00 2001 From: 0xKawaka <0xKawaka@proton.me> Date: Wed, 24 Jan 2024 19:20:33 +0100 Subject: [PATCH] Bug fix: full name match required instead of only starts_with when locating artifacts --- Cargo.lock | 2 +- src/declare.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b65603..a2a16d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1071,7 +1071,7 @@ dependencies = [ [[package]] name = "kipt" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "async-trait", diff --git a/src/declare.rs b/src/declare.rs index 4e7e225..6d1bcf6 100644 --- a/src/declare.rs +++ b/src/declare.rs @@ -233,7 +233,7 @@ fn locate_artifacts( } else if let Some(file_name) = entry_path.file_name() { trace!("Checking file for artifacts: {:?}", file_name); let fname = file_name.to_string_lossy(); - if !fname.starts_with(contract_name) { + if !fname.starts_with(contract_name) || fname.split('.').next() != Some(contract_name) { continue; }