fix(solc): apply base path to model checker contracts (#1437)

This commit is contained in:
Matthias Seitz 2022-06-30 18:18:32 +02:00 committed by GitHub
parent ca34d0c049
commit 9fc55c0aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -422,6 +422,24 @@ impl Settings {
})
.collect(),
);
if let Some(mut model_checker) = self.model_checker.take() {
model_checker.contracts = model_checker
.contracts
.into_iter()
.map(|(path, contracts)| {
(
Path::new(&path)
.strip_prefix(base)
.map(|p| format!("{}", p.display()))
.unwrap_or(path),
contracts,
)
})
.collect();
self.model_checker = Some(model_checker);
}
self
}
}