forked from Cutieguwu/raven
Fix Java project structure.
This commit is contained in:
@@ -10,7 +10,12 @@ pub fn expand_files<P: AsRef<Path>>(path: P) -> anyhow::Result<Vec<PathBuf>> {
|
||||
Ok(std::fs::read_dir(path)?
|
||||
.filter_map(|entry| {
|
||||
let path = entry.ok()?.path();
|
||||
if path.is_file() { Some(path) } else { None }
|
||||
if path.is_dir() {
|
||||
Some(expand_files(path).ok()?)
|
||||
} else {
|
||||
Some(vec![path])
|
||||
}
|
||||
})
|
||||
.flatten()
|
||||
.collect())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user