diff options
author | das <das> | 2003-05-22 01:12:50 (GMT) |
---|---|---|
committer | das <das> | 2003-05-22 01:12:50 (GMT) |
commit | bcb3bc0dc3f04c7b793635557ddc7e686db98576 (patch) | |
tree | 81b73d506bff67509a3d04be3f455a84a582d208 /macosx/tclMacOSXBundle.c | |
parent | c22fc5dd49b8b650ef0adf2eb1eab1a879f61f95 (diff) | |
download | tcl-bcb3bc0dc3f04c7b793635557ddc7e686db98576.zip tcl-bcb3bc0dc3f04c7b793635557ddc7e686db98576.tar.gz tcl-bcb3bc0dc3f04c7b793635557ddc7e686db98576.tar.bz2 |
* macosx/tclMacOSXBundle.c: fixed a problem that caused only the
first call to Tcl_MacOSXOpenVersionedBundleResources() for a given
bundle indentifier to succeed. This caused the tcl runtime library
not to be found in all interps created after the inital one.
Diffstat (limited to 'macosx/tclMacOSXBundle.c')
-rw-r--r-- | macosx/tclMacOSXBundle.c | 10 |
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) { |