Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/sys/class/hwmon* are not directories, they are symbolic links #1246

Merged
merged 1 commit into from Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/unix/linux/component.rs
Expand Up @@ -374,16 +374,15 @@ impl ComponentsInner {
continue;
};
let entry = entry.path();
if !file_type.is_dir()
|| !entry
if !file_type.is_file()
&& entry
.file_name()
.and_then(|x| x.to_str())
.unwrap_or("")
.starts_with("hwmon")
{
continue;
ComponentInner::from_hwmon(&mut self.components, &entry);
}
ComponentInner::from_hwmon(&mut self.components, &entry);
}
}
}
Expand Down