From 88971d2405a2e25a55cacac7a92e059f0634aa91 Mon Sep 17 00:00:00 2001 From: Raj Seshasankaran Date: Tue, 18 Oct 2016 11:04:35 -0700 Subject: [PATCH] Do not roam NSUserDefaults (or CFPreferences) (#1169) * 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 --- Frameworks/CoreFoundation/Base.subproj/CFPlatform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frameworks/CoreFoundation/Base.subproj/CFPlatform.c b/Frameworks/CoreFoundation/Base.subproj/CFPlatform.c index e1db539859..c8d536dcf6 100644 --- a/Frameworks/CoreFoundation/Base.subproj/CFPlatform.c +++ b/Frameworks/CoreFoundation/Base.subproj/CFPlatform.c @@ -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);