Skip to content

Commit 71029a9

Browse files
CopilotShikiSuen
andcommitted
Fix Windows CI failure in CFKnownLocations - Remove broken username check
Co-authored-by: ShikiSuen <3164826+ShikiSuen@users.noreply.github.com>
1 parent f9f79c7 commit 71029a9

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/CoreFoundation/CFKnownLocations.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,7 @@ CFURLRef _Nullable _CFKnownLocationCreatePreferencesURLForUser(CFKnownLocationUs
9696
break;
9797
}
9898
case _kCFKnownLocationUserCurrent:
99-
username = CFGetUserName();
100-
// The above API returns a non-NULL CFStringRef. The failed result is an empty string.
101-
// We need to check for that case and fall through to the next case.
102-
Boolean isEmpty = CFEqual(username, CFSTR(""));
103-
CFRelease(username);
104-
if (!isEmpty) {
105-
break;
106-
}
107-
// fallthrough.
99+
// fallthrough
108100
case _kCFKnownLocationUserByName: {
109101
wchar_t* path = NULL;
110102
SHGetKnownFolderPath(&FOLDERID_LocalAppData, 0, NULL, &path);

0 commit comments

Comments
 (0)