svartalf / rust-battery

Rust crate providing cross-platform information about the notebook batteries.
https://crates.io/crates/battery
Apache License 2.0
354 stars 40 forks source link

Linux impl does not handle the missing power_supply folder #29

Closed svartalf closed 5 years ago

svartalf commented 5 years ago

Manager::refresh folder should check if battery root path is still exists and return an Err(..) immediately if Linux had removed that folder.

Since Battery struct is an instant information representation, it is not affected by the related bug.

For details see: https://github.com/svartalf/rust-battop/issues/8