mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
battery: skip writable check for power supply path
It wouldn't even work, lol.
This commit is contained in:
parent
f4fceed893
commit
2a5c00e3a7
1 changed files with 2 additions and 7 deletions
|
@ -87,13 +87,8 @@ pub fn set_battery_charge_thresholds(start_threshold: u8, stop_threshold: u8) ->
|
|||
));
|
||||
}
|
||||
|
||||
// Check if the power supply directory is writable
|
||||
// This helps identify permission issues in containerized environments early
|
||||
if !is_path_writable(power_supply_path) {
|
||||
return Err(ControlError::PermissionDenied(
|
||||
"Power supply path exists but is not writable. This may occur in containerized environments.".to_string(),
|
||||
));
|
||||
}
|
||||
// XXX: Skip checking directory writability since /sys is a virtual filesystem
|
||||
// Individual file writability will be checked by find_battery_with_threshold_support
|
||||
|
||||
let supported_batteries = find_supported_batteries(power_supply_path)?;
|
||||
if supported_batteries.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue