Skip to content

Commit c08e8dd

Browse files
committed
WINNT // Patch a fallthrough from _kCFKnownLocationUserCurrent.
1 parent deca6bd commit c08e8dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/CoreFoundation/CFKnownLocations.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ CFURLRef _Nullable _CFKnownLocationCreatePreferencesURLForUser(CFKnownLocationUs
9797
}
9898
case _kCFKnownLocationUserCurrent:
9999
username = CFGetUserName();
100-
break;
100+
if (!CFEqual(username, CFSTR(""))) {
101+
break;
102+
}
103+
// fallthrough.
101104
case _kCFKnownLocationUserByName: {
102105
wchar_t* path = NULL;
103106
SHGetKnownFolderPath(&FOLDERID_LocalAppData, 0, NULL, &path);

0 commit comments

Comments
 (0)