brightnessctl icon indicating copy to clipboard operation
brightnessctl copied to clipboard

Refactor save

Open andeston opened this issue 1 year ago • 3 comments

andeston avatar Nov 26 '24 20:11 andeston

Why (apart from the fix)?

Hummer12007 avatar Dec 10 '24 09:12 Hummer12007

Why (apart from the fix)?

Short answer is I don't really remember.

d6e5d18: I think this didn't fully fix the problem on it's own. The other changes were for fixing bugs caused by that change, XDG Base Directory Specification compliance, simplification, and readability.

af938fb: ensure_dev_dir and ensure_run_dir basically only called ensure_dir

09d9e49: mkdir_parent is more generic and, IMO, more useful.

6fee015: Honestly, this one might be mostly a style thing. I don't like goto. I think it should be avoided unless absolutely necessary. For me, this is more readable and more clearly indicates intent. You may disagree, and that's fine.

3b7b63b: converting from binary to text and from text back to binary is completely unnecessary.

412c991: Permissions.

8eea9f5: Permissions.

Let me know if you have other questions/concerns about any of the commits.

Thanks and welcome back.

andeston avatar Dec 10 '24 18:12 andeston

Thanks, I'll take a look.

Hummer12007 avatar Dec 11 '24 22:12 Hummer12007