-
-
Notifications
You must be signed in to change notification settings - Fork 609
Feat/respect xdg spec on all os #2627
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
Open
KlassyKat
wants to merge
15
commits into
gitui-org:master
Choose a base branch
from
KlassyKat:feat/respect-xdg-spec-on-all-os
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+124
−32
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
beb71fb
Initial Implementation: Create a set of potential config locations to…
KlassyKat 8e307d3
Apply the same logic to get_app_cache_path
KlassyKat fb935b7
Refactor to make logic more reusable and testable
KlassyKat 819b4ca
Realize I don't know how to spell candidates
KlassyKat cbc388d
refactor to be a little cleaner
KlassyKat 299015a
don't create an empty config folder
KlassyKat 9ea0d0d
Add unit tests
KlassyKat cde05b1
Update docs to reflect new behavior
KlassyKat e8440c2
Add changelog item
KlassyKat e54cab7
Merge branch 'gitui-org:master' into feat/respect-xdg-spec-on-all-os
KlassyKat 4bb1279
Only consider absolute paths as valid
KlassyKat bafd07c
Change error message wording
KlassyKat 759c26a
Add utility function to ensure select paths exist
KlassyKat c2e58ee
Only consider absolute paths better
KlassyKat a1adeb1
Fix "keybinding" to "key binding"
KlassyKat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more remark: At least for XDG,
Path::is_dir
isn't a precondition for considering that path. If it doesn't exist, create it (with permissions 0700)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only applies when attempting to write a file.
So believe this point is fairly moot when it comes to
XDG_CONFIG_HOME
.That being said it does have some consideration for
XDG_CACHE_HOME
, but I think there is still some room for interpretation. I think you could consider that line to be referring to the creation of an app subdirectory and not to create the root directory itself. In which case that is already being done. Furthermore when it comes to creating good UX a user may have anXDG_CACHE_HOME
defined which would result in that being the location to write to by default. But say the user wanted to keepXDG_CACHE_HOME
only having the logs of particular apps creating agitui
folder in the fallback cache directory would allow them to filter it out.I don't really imagine anyone wanting to do that, but it seems superior to have the option than not to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for
XDG_CONFIG_HOME
it does not make a difference as of now, as we don't create things there. ForXDG_CACHE_HOME
it does, though.It worked before and does not work now. I'm sorry to say, but I don't think I'd want to approve this. If this were to fix a huge issue, okay, but this only addresses a (very) peculiar concern on windows.