diff options
author | 2017-01-15 02:18:49 -0500 | |
---|---|---|
committer | 2017-01-15 02:31:30 -0500 | |
commit | 4aa6d8fff1e1e034c1a73d02d3515df36b93bbaf (patch) | |
tree | 4225395216194fde1ee4569b0d3d317d5f3d2c64 /LICENSE | |
parent | 0cedae398a108e287edb440ddcf877fb58bcb272 (diff) |
Print error if run dir is not a directory
Print an error message if the run directory or the device-class
subdirectory exists but is not a directory.
Before:
% rm -rf /tmp/brightnessctl
% touch /tmp/brightnessctl
% brightnessctl -s
Device 'intel_backlight' of class 'backlight':
Current brightness: 1000 (20%)
Max brightness: 4794
% file /tmp/brightnessctl
/tmp/brightnessctl: empty
%
After:
% brightnessctl -s
Error saving device data: Not a directory
Could not save data for device 'intel_backlight'.
Device 'intel_backlight' of class 'backlight':
Current brightness: 1000 (20%)
Max brightness: 4794
%
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions