Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix(solc): follow symlinks in source files #1277

Merged
merged 1 commit into from
May 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ethers-solc/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ pub fn find_version_pragma(contract: &str) -> Option<Match> {
/// Returns a list of absolute paths to all the solidity files under the root, or the file itself,
/// if the path is a solidity file.
///
/// This also follows symlinks.
///
/// NOTE: this does not resolve imports from other locations
///
/// # Example
Expand All @@ -85,6 +87,7 @@ pub fn find_version_pragma(contract: &str) -> Option<Match> {
/// ```
pub fn source_files(root: impl AsRef<Path>) -> Vec<PathBuf> {
WalkDir::new(root)
.follow_links(true)
.into_iter()
.filter_map(Result::ok)
.filter(|e| e.file_type().is_file())
Expand Down