Skip to content

Commit fcda3c7

Browse files
committed
[Windows] Remove Fallback Path with Loading Bundles
When loading an invalid bundle rather than failing as the Darwin path does, it instead returns the parent directory of the given bundle as an unloaded bundle. This removes the hunk so that the Windows behavior matches the other platforms.
1 parent 5e58226 commit fcda3c7

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

CoreFoundation/PlugIn.subproj/CFBundle.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -707,15 +707,6 @@ static CFBundleRef _CFBundleCreate(CFAllocatorRef allocator, CFURLRef bundleURL,
707707
localVersion = _CFBundleGetBundleVersionForURL(newURL);
708708
if (localVersion == 3) {
709709
SInt32 res = _CFGetPathProperties(allocator, (char *)buff, &exists, &mode, NULL, NULL, NULL, NULL);
710-
#if TARGET_OS_WIN32
711-
if (!(res == 0 && exists && ((mode & S_IFMT) == S_IFDIR))) {
712-
// 2nd chance at finding a bundle path - remove the last path component (e.g., mybundle.resources) and try again
713-
CFURLRef shorterPath = CFURLCreateCopyDeletingLastPathComponent(allocator, newURL);
714-
CFRelease(newURL);
715-
newURL = shorterPath;
716-
res = _CFGetFileProperties(allocator, newURL, &exists, &mode, NULL, NULL, NULL, NULL);
717-
}
718-
#endif
719710
if (res == 0) {
720711
if (!exists || ((mode & S_IFMT) != S_IFDIR)) {
721712
CFRelease(newURL);

0 commit comments

Comments
 (0)