Modify to handle symplink as well as file

* The current source causes problems when building `sv-parser` on bazel build system
  * because bazel creates the working directory for the build as a symlink
This commit is contained in:
ryan.park 2023-07-28 07:54:31 +09:00
parent 2f6e404c89
commit aaf4661bee

View File

@ -65,7 +65,7 @@ fn main() {
for entry in WalkDir::new("src") { for entry in WalkDir::new("src") {
let entry = entry.unwrap(); let entry = entry.unwrap();
if entry.file_type().is_file() { if entry.path().is_file() {
let f = File::open(entry.path()).unwrap(); let f = File::open(entry.path()).unwrap();
let f = BufReader::new(f); let f = BufReader::new(f);
let mut hit_node = false; let mut hit_node = false;