summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2003-05-22 01:15:33 (GMT)
committerdas <das>2003-05-22 01:15:33 (GMT)
commit3c0638ee1082fa4a5532f072968fe1a749323ce8 (patch)
tree6c0cb6eaa359ac492918137b0a2981f722776d70 /macosx
parentd0a7f1369bfef5d6460ae2b2f801d07a00d6158a (diff)
downloadtcl-3c0638ee1082fa4a5532f072968fe1a749323ce8.zip
tcl-3c0638ee1082fa4a5532f072968fe1a749323ce8.tar.gz
tcl-3c0638ee1082fa4a5532f072968fe1a749323ce8.tar.bz2
* macosx/tclMacOSXBundle.c: fixed a problem that caused only the
first call to Tcl_MacOSXOpenVersionedBundleResources() for a given bundle identifier to succeed. This caused the tcl runtime library not to be found in all interps created after the inital one.
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) {