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

linux/storagepath: fixup a host of issues #646

Merged
merged 2 commits into from
Jul 6, 2022
Merged

Conversation

rski
Copy link
Contributor

@rski rski commented Sep 17, 2021

The issues fixed are explained in the commits:

Author: Romanos Skiadas rom.skiad@gmail.com
Date: Fri Sep 17 20:41:42 2021 +0300

linux/storagepath: Revamp handling of user-dirs

- dont assume that ~/.config/user-dirs.dirs exists
- don't assume it does have contents or the relevant value
- don't use exception handling as happy path control flow
- when defaulting, use the path under HOME, not e.g. /Pictures

commit 99dabb2
Author: Romanos Skiadas rom.skiad@gmail.com
Date: Fri Sep 17 20:31:08 2021 +0300

linux/storagepath: Fixup DOCUMENTS to DOCUMENT

this is the right name according to the XDG spec, and the key used in
the default paths dict

This is a superset of #539. It both fixes more issues, and makes the code a bit simpler, as it removes the exception handling that is not really needed. The reaason for this PR is that the other PR seems to have stalled, and we would like to merge these fixes in order to package plyer for nixpkgs, as it's a dependency of a new version of mirage, which is already packaged.

this is the right name according to the XDG spec, and the key used in
the default paths dict
- dont assume that ~/.config/user-dirs.dirs exists
- don't assume it does have contents or the relevant value
- don't use exception handling as happy path control flow
- when defaulting, use the path under HOME, not e.g. /Pictures
@akshayaurora
Copy link
Member

@rski 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants