|
|
@ -16,15 +16,10 @@ pub fn find_pkg_directory(guess_path: &str) -> Option<PathBuf> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
path.read_dir().ok().and_then(|entries| { |
|
|
|
path.read_dir().ok().and_then(|entries| { |
|
|
|
for entry in entries { |
|
|
|
entries |
|
|
|
if entry.is_ok() { |
|
|
|
.filter(|x| x.is_ok()) |
|
|
|
let p = entry.unwrap().path(); |
|
|
|
.map(|x| x.unwrap().path()) |
|
|
|
if is_pkg_directory(&p) { |
|
|
|
.find(|x| is_pkg_directory(&x)) |
|
|
|
return Some(p); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
None |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|