Skip to content

Commit e3961df

Browse files
committed
cargo: Discover crates in subdirectories
1 parent 8688b1b commit e3961df

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/cargo/cargo.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,13 @@ fn rustc_sysroot() -> str {
517517
fn install_source(c: cargo, path: str) {
518518
#debug("source: %s", path);
519519
os::change_dir(path);
520-
let contents = os::list_dir_path(".");
521520

522-
#debug("contents: %s", str::connect(contents, ", "));
523-
524-
let cratefiles =
525-
vec::filter::<str>(contents, { |n| str::ends_with(n, ".rc") });
521+
let mut cratefiles = [];
522+
for os::walk_dir(".") {|p|
523+
if str::ends_with(p, ".rc") {
524+
cratefiles += [p];
525+
}
526+
}
526527

527528
if vec::is_empty(cratefiles) {
528529
fail "This doesn't look like a rust package (no .rc files).";

0 commit comments

Comments
 (0)