mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Only filter out target if its in the package root
This commit is contained in:
parent
1d8980511e
commit
eebed13f46
@ -327,7 +327,12 @@ impl<'cfg> PathSource<'cfg> {
|
||||
|
||||
match file_path.file_name().and_then(|s| s.to_str()) {
|
||||
// The `target` directory is never included.
|
||||
Some("target") => continue,
|
||||
Some("target") => {
|
||||
// Only filter out target if its in the package root.
|
||||
if file_path.parent().unwrap() == pkg_path {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep track of all sub-packages found and also strip out all
|
||||
// matches we've found so far. Note, though, that if we find
|
||||
|
Loading…
x
Reference in New Issue
Block a user