Skip to content

Commit

Permalink
Do not roam NSUserDefaults (or CFPreferences) (#1169)
Browse files Browse the repository at this point in the history
* Save NSUserDefaults to local app data, not roaming app data.
App preferences writes with kCFPreferencesAnyHost, which means we cannot
use the host parameter to differentiate roaming vs local.

The correct way to roam would be through ubiquitous store (which would
have to be covered separately based on need).

Fix #1167

* revert unwanted edits

* CR feedback
  • Loading branch information
Raj Seshasankaran authored Oct 18, 2016
1 parent 5b56a0e commit 88971d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Frameworks/CoreFoundation/Base.subproj/CFPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,8 @@ CF_EXPORT CFMutableStringRef _CFCreateApplicationRepositoryPath(CFAllocatorRef a
CFMutableStringRef result = NULL;
CFStringRef str = NULL;

// WINOBJC: make sure that nFolder is CSIDL_APPDATA or CSIDL_LOCAL_APPDATA and return the app data folder for the app.
Wrappers::HString path = GetAppDataPath(nFolder == CSIDL_LOCAL_APPDATA);
// WINOBJC: In Reference platform, CFPreferences does not roam, so ignore nFolder
Wrappers::HString path = GetAppDataPath(true);
if (path.IsValid()) {
unsigned int rawLength;
const wchar_t* rawPath = WindowsGetStringRawBuffer(path.Get(), &rawLength);
Expand Down

0 comments on commit 88971d2

Please sign in to comment.