Changeset 6752


Ignore:
Timestamp:
Sep 16, 2008, 4:37:52 PM (13 years ago)
Author:
charles
Message:

(mac) backport to 1.3x: #1210 "Web UI yields 'Error: 404' not found if path contains a space"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3x/libtransmission/platform.c

    r6487 r6752  
    533533        {
    534534#ifdef SYS_DARWIN
     535            CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
     536            CFStringRef appRef = CFURLCopyFileSystemPath( appURL, kCFURLPOSIXPathStyle );
     537            const char * appString = CFStringGetCStringPtr( appRef, CFStringGetFastestEncoding( appRef ) );
     538            CFRelease( appURL );
     539            CFRelease( appRef );
    535540           
    536             CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
    537             CFStringRef appRef = CFURLCopyPath( appURL );
    538             const char * appString = CFStringGetCStringPtr( appRef, CFStringGetFastestEncoding( appRef ) );
    539             CFRelease(appURL);
    540             CFRelease(appRef);
    541            
    542             /*CFURLRef resourcesDirURL = CFBundleCopyResourcesDirectoryURL( CFBundleGetMainBundle() );
    543             CFStringRef resourcesDirRef = CFURLCopyPath( resourcesDirURL );
    544             const char * resourcesDirString = CFStringGetCStringPtr( resourcesDirRef, CFStringGetFastestEncoding( resourcesDirRef ) );
    545             CFRelease(resourcesDirURL);
    546             CFRelease(resourcesDirRef);*/
    547            
    548             sprintf( path, "%s%s", appString, "Contents/Resources/web" );
    549 
     541            tr_buildPath( path, sizeof( path ), appString, "Contents", "Resources", "web", NULL );
    550542#elif defined(WIN32)
    551543
Note: See TracChangeset for help on using the changeset viewer.