1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

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

This commit is contained in:
Mitchell Livingston 2008-08-22 23:55:33 +00:00
parent 6cf752b33d
commit fa8ffca078

View file

@ -525,21 +525,13 @@ tr_getClutchDir( const tr_session * session UNUSED )
else
{
#ifdef SYS_DARWIN
CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
CFStringRef appRef = CFURLCopyPath( appURL );
CFStringRef appRef = CFURLCopyFileSystemPath( appURL, kCFURLPOSIXPathStyle );
const char * appString = CFStringGetCStringPtr( appRef, CFStringGetFastestEncoding( appRef ) );
CFRelease(appURL);
CFRelease(appRef);
CFRelease( appURL );
CFRelease( appRef );
/*CFURLRef resourcesDirURL = CFBundleCopyResourcesDirectoryURL( CFBundleGetMainBundle() );
CFStringRef resourcesDirRef = CFURLCopyPath( resourcesDirURL );
const char * resourcesDirString = CFStringGetCStringPtr( resourcesDirRef, CFStringGetFastestEncoding( resourcesDirRef ) );
CFRelease(resourcesDirURL);
CFRelease(resourcesDirRef);*/
sprintf( path, "%s%s", appString, "Contents/Resources/web" );
tr_buildPath( path, sizeof( path ), appString, "Contents", "Resources", "web", NULL );
#elif defined(WIN32)
#warning hey win32 people is this good or is there a better implementation of the next four lines