]> git.lyx.org Git - lyx.git/blobdiff - src/support/Path.cpp
tiger support on mac snow leopard, include Qt4 frameworks, smart build script with...
[lyx.git] / src / support / Path.cpp
index 7bac78aa37e37dfb083b55abc5d7435606a2f781..36837f6f9a06e2f530c0316f3f93db18d38813cc 100644 (file)
@@ -72,18 +72,19 @@ int getPrivateFrameworkPathName(char * buf, unsigned len, char const * framework
 {
        // Get our application's main bundle from Core Foundation
        CFBundleRef myAppsBundle = CFBundleGetMainBundle();
+       int result = 0 ;
        if (NULL != myAppsBundle) {
                CFURLRef baseURL = CFBundleCopyPrivateFrameworksURL( myAppsBundle );
                if (NULL != baseURL) {
                        CFURLRef bundleURL = CFURLCreateCopyAppendingPathComponent( kCFAllocatorSystemDefault, baseURL,
-                               CFStringCreateWithCString(kCFAllocatorSystemDefault, framework, kCFStringEncodingMacRoman),
+                               CFStringCreateWithCString( kCFAllocatorSystemDefault, framework, CFStringGetSystemEncoding() ),
                                false );
-                       if ( NULL != bundleURL && CFURLGetFileSystemRepresentation(bundleURL, TRUE, (UInt8*)buf, len) ) {
-                               return 1 ;
+                       if (NULL != bundleURL) {
+                               result = CFURLGetFileSystemRepresentation( bundleURL, TRUE, (UInt8*)buf, len );
                        }
                }
        }
-       return 0;
+       return result;
 }
 
 #endif