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

[Windows, CoreFoundation] Construct Preferences Using Known Locations #2510

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

gmittert
Copy link
Contributor

The current Windows implementation doesn't properly handle
kCFPreferencesAnyUsers, which causes it point to the same location as
kCFPreferencesCurrentUser which causes preferences to be loaded
incorrectly.

Instead, we should defer to CFKnownLocations as the non Windows
implementation already does

The current Windows implementation doesn't properly handle
kCFPreferencesAnyUsers, which causes it point to the same location as
kCFPreferencesCurrentUser which causes preferences to be loaded
incorrectly.

Instead, we should defer to CFKnownLocations as the non Windows
implementation already does
Copy link
Contributor

@drodriguez drodriguez left a comment

Choose a reason for hiding this comment

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

Everything that leads to less platform-specific code and works will always look better to me. Thanks!

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.

Yeah, now that KnownLocations are supported on Windows, this seems like the right thing to do. Thanks for fixing this.

@compnerd
Copy link
Member

@swift-ci please test

@gmittert gmittert merged commit fff2489 into swiftlang:master Sep 12, 2019
@gmittert gmittert deleted the DoIKnowYou branch September 12, 2019 06:09
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.

3 participants