Skip to content

CoreFoundation: Correctly construct user preferences directory #5184

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

2xsaiko
Copy link

@2xsaiko 2xsaiko commented Mar 4, 2025

Putting an absolute path here as the subdirectory to append makes the home directory prefix get removed and the final path ends up as /Library/Preferences instead of ~/Library/Preferences, etc.

@2xsaiko 2xsaiko force-pushed the push-xnztvswsqxpw branch from 9698f89 to 0b1fb1d Compare May 4, 2025 22:58
@compnerd
Copy link
Member

compnerd commented May 5, 2025

Technically, this change is fine. However,I wonder if it is currently required or not. Where is this path exercised? It is slightly confusing as FileManager has migrated to swift-foundation and has an implementation which doesn’t include CoreFoundation.

CC: @parkera

@compnerd compnerd requested review from parkera and jmschonfeld May 5, 2025 15:36
@2xsaiko
Copy link
Author

2xsaiko commented May 5, 2025

UserDefaults class uses this, unless that has changed since I wrote this.

@parkera parkera requested a review from hristost May 5, 2025 16:16
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, UserDefaults coming through here makes sense.

@compnerd
Copy link
Member

compnerd commented May 5, 2025

@swift-ci please test

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.

2 participants