In the codebase, there are many places, especially within swhks where filenames and paths have been manipulated using strings and with no sufficient checks in place as to whether they exist or the user has permission to access them.
This proposal is to use high efficient crates like path_abs and dirs along with some higher order use of functions in order to fix this issue.
Moreover, the usuage of env variables can be centralised and validated, reducing code complexity and the use of crate: path_abs would provide good validations as well
This issue is a proposal to make these changes and I am ready to go more into the details of it
In the codebase, there are many places, especially within swhks where filenames and paths have been manipulated using strings and with no sufficient checks in place as to whether they exist or the user has permission to access them.
This proposal is to use high efficient crates like path_abs and dirs along with some higher order use of functions in order to fix this issue.
Some examples of this in the code base are: swhks/src/main.rs line: 160, 161, 67 main/swhkd/src/daemon.rs line: 567, 561
Moreover, the usuage of env variables can be centralised and validated, reducing code complexity and the use of
crate: path_abs
would provide good validations as wellThis issue is a proposal to make these changes and I am ready to go more into the details of it