1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

#1084: Make web' and clutch' synonymous in the backend

This commit is contained in:
Charles Kerr 2008-07-14 16:00:20 +00:00
parent a66c930583
commit 4813647346
2 changed files with 9 additions and 3 deletions

View file

@ -527,12 +527,16 @@ tr_getClutchDir( const tr_session * session UNUSED )
if( !s )
{
char path[MAX_PATH_LENGTH];
char path[MAX_PATH_LENGTH] = { '\0' };
if(( s = getenv( "CLUTCH_HOME" )))
{
snprintf( path, sizeof( path ), s );
}
else if(( s = getenv( "TRANSMISSION_WEB_HOME" )))
{
snprintf( path, sizeof( path ), s );
}
else
{
#ifdef SYS_DARWIN
@ -575,7 +579,7 @@ tr_getClutchDir( const tr_session * session UNUSED )
}
for( l=candidates; l; l=l->next ) {
tr_buildPath( path, sizeof( path ), l->data, "transmission", "clutch", NULL );
tr_buildPath( path, sizeof( path ), l->data, "transmission", "web", NULL );
if( isClutchDir( path ) )
break;
*path = '\0';

View file

@ -267,7 +267,9 @@ startServer( tr_rpc_server * server )
shttpd_register_uri( server->ctx, "/transmission/upload", handle_upload, server );
if( clutchDir && *clutchDir ) {
char * clutchAlias = tr_strdup_printf( "%s=%s", "/transmission/clutch", clutchDir );
char * clutchAlias = tr_strdup_printf( "%s=%s,%s=%s",
"/transmission/clutch", clutchDir,
"/transmission/web", clutchDir );
tr_inf( _( "Serving the web interface files from \"%s\"" ), clutchDir );
shttpd_set_option( server->ctx, "aliases", clutchAlias );
tr_free( clutchAlias );