Changeset 6642


Ignore:
Timestamp:
Aug 22, 2008, 11:55:33 PM (13 years ago)
Author:
livings124
Message:

#1210 on Mac, the web ui should now work when Transmission's path contains a space

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r6559 r6642  
    526526        {
    527527#ifdef SYS_DARWIN
     528            CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
     529            CFStringRef appRef = CFURLCopyFileSystemPath( appURL, kCFURLPOSIXPathStyle );
     530            const char * appString = CFStringGetCStringPtr( appRef, CFStringGetFastestEncoding( appRef ) );
     531            CFRelease( appURL );
     532            CFRelease( appRef );
    528533           
    529             CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
    530             CFStringRef appRef = CFURLCopyPath( appURL );
    531             const char * appString = CFStringGetCStringPtr( appRef, CFStringGetFastestEncoding( appRef ) );
    532             CFRelease(appURL);
    533             CFRelease(appRef);
    534            
    535             /*CFURLRef resourcesDirURL = CFBundleCopyResourcesDirectoryURL( CFBundleGetMainBundle() );
    536             CFStringRef resourcesDirRef = CFURLCopyPath( resourcesDirURL );
    537             const char * resourcesDirString = CFStringGetCStringPtr( resourcesDirRef, CFStringGetFastestEncoding( resourcesDirRef ) );
    538             CFRelease(resourcesDirURL);
    539             CFRelease(resourcesDirRef);*/
    540            
    541             sprintf( path, "%s%s", appString, "Contents/Resources/web" );
    542 
     534            tr_buildPath( path, sizeof( path ), appString, "Contents", "Resources", "web", NULL );
    543535#elif defined(WIN32)
    544536
Note: See TracChangeset for help on using the changeset viewer.