Refactor get_socket_path() and support KPXC 2.7.4 for Flatpak #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #53
Changes
4436b22
refactor: Separate socket path logic for OSes/KPXC versionsBreaks down the very convoluted get_socket_path() into smaller pieces,
each taking care of a specific OS and KeePassXC (or KeePass 2)
combination.
Also instead of using a OnceCell to cater for the command line argument,
pass it along using an environment variable. There is no need to cache
this result anyway since it's only called by get_stream(). This should
fall into place nicely in terms of their priority as well.
7356fc8
feat: Support socket path of KPXC 2.7.4 FlatpakTo avoiding mounting everything into Flatpak sandbox, the socket was
moved into a separate path under Linux [1][2].
Note this does not affect other distributions under Linux as there is a
symbolic link from the old path [3].
[1] keepassxreboot/keepassxc#8030
[2] keepassxreboot/keepassxc@1009650
[3] https://github.com/keepassxreboot/keepassxc/blob/2.7.4/src/browser/BrowserShared.cpp#L49
Checklist
Is this a breaking change?
No