Skip to content
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

Caching capabilities doesnt check if directory exist #2

Open
Ghibranalj opened this issue Dec 10, 2023 · 0 comments
Open

Caching capabilities doesnt check if directory exist #2

Ghibranalj opened this issue Dec 10, 2023 · 0 comments

Comments

@Ghibranalj
Copy link

I love your tool but i found an (nitpicky) issue.
when i misconfigured my config.json to use a directory that doesnt exist

  "cache": "/doesnt/exist/cache"

this error occurs

File "/opt/persistent-evdev/bin/persistent-evdev.py", line 74, in save_capabilities
  with open(capabilities_path, "w+") as file:
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/doesnt/exist/cache/device.json'

it would be nice if

make_capabilities_path(self)

also check if the directory exist and if not it would create it

Ghibranalj added a commit to Ghibranalj/persistent-evdev that referenced this issue Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant