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

Improve macOS config base directory defaults #13

Merged
merged 3 commits into from
Feb 22, 2021

Conversation

adrg
Copy link
Owner

@adrg adrg commented Feb 22, 2021

Changed defaults for:

XDG_CONFIG_HOME: ~/Library/Preferences to ~/Library/Application Support.
XDG_CONFIG_DIRS: /Library/Preferences to ~/Library/Preferences:/Library/Application Support:/Library/Preferences.

~/Library/Preferences was not a suitable place for application configuration files, as stated in the Apple Developer docs:

This directory contains app-specific preference files. You should not create files in this directory 
yourself. Instead, use the NSUserDefaults class or CFPreferences API to get and set preference
values for your app.

~/Library/Application Support seems like a more appropriate location:

Use this directory to store all app data files except those associated with the user’s documents.
For example, you might use this directory to store app-created data files, configuration files, templates,
or other fixed or modifiable resources that are managed by the app. An app might use this directory to 
store a modifiable  copy of resources contained initially in the app’s bundle. A game might use this 
directory to store new levels purchased by the user and downloaded from a server.

All content in this directory should be placed in a custom subdirectory whose name is that of your app’s
bundle identifier or your company.

Reference.

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #13 (b5336d9) into master (28f7229) will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   92.39%   92.63%   +0.24%     
==========================================
  Files           6        6              
  Lines         184      190       +6     
==========================================
+ Hits          170      176       +6     
  Misses         13       13              
  Partials        1        1              
Impacted Files Coverage Δ
paths_darwin.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28f7229...b5336d9. Read the comment docs.

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.

1 participant