Changeset 8049


Ignore:
Timestamp:
Mar 10, 2009, 3:27:03 PM (12 years ago)
Author:
charles
Message:

(1.5x gtk) launchpad bug #338046: XDG_DOWNLOAD_DIR isn't honored in gtk client

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/libtransmission/session.c

    r7897 r8049  
    312312    char * filename;
    313313    tr_benc fileSettings;
     314    tr_benc sessionDefaults;
     315    tr_benc tmp;
    314316
    315317    assert( tr_bencIsDict( d ) );
    316318
    317     /* get the defaults */
    318     tr_sessionGetDefaultSettings( d );
     319    /* initializing the defaults: caller may have passed in some app-level defaults.
     320     * preserve those and use the session defaults to fill in any missing gaps. */
     321    tr_bencInitDict( &sessionDefaults, 0 );
     322    tr_sessionGetDefaultSettings( &sessionDefaults );
     323    tr_bencMergeDicts( &sessionDefaults, d );
     324    tmp = *d; *d = sessionDefaults; sessionDefaults = tmp;
    319325
    320326    /* if caller didn't specify a config dir, use the default */
     
    330336
    331337    /* cleanup */
     338    tr_bencFree( &sessionDefaults );
    332339    tr_free( filename );
    333340}
Note: See TracChangeset for help on using the changeset viewer.