summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tclMacOSXBundle.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index 88def57..5018aa8 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -138,6 +138,16 @@ Tcl_MacOSXOpenVersionedBundleResources(
bundleVersion, kCFStringEncodingUTF8);
CFURLRef bundleURL = CFBundleCopyBundleURL(bundleRef);
if (bundleURL) {
+ CFStringRef bundleTailRef = CFURLCopyLastPathComponent(bundleURL);
+ if (bundleTailRef) {
+ if (CFStringCompare(bundleTailRef,bundleVersionRef,0)
+ == kCFCompareEqualTo) {
+ versionedBundleRef = bundleRef;
+ }
+ CFRelease(bundleTailRef);
+ }
+ }
+ if (bundleURL && !versionedBundleRef) {
CFURLRef versURL = CFURLCreateCopyAppendingPathComponent(NULL,
bundleURL, CFSTR("Versions"), TRUE);
if (versURL) {