-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Better Path handling Mechanisms #240
Comments
newtoallofthis123
changed the title
Proposal: Better Filename and Path handling Systems
Proposal: Better Path handling Mechanisms
Feb 24, 2024
Addressed in PR #243 |
Hi, this isn't complete yet as |
Also addressed in #246 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: