Changeset 13273


Ignore:
Timestamp:
Apr 8, 2012, 4:02:48 PM (9 years ago)
Author:
jordan
Message:

(trunk, gtk) #4573 'fix crash when opening a torrent file on systems that don't define G_USER_DIRECTORY_DOWNLOAD'. Thanks to Felipe Contreras for the initial patch.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r13272 r13273  
    99  * Fix regression that ignored user-specified TRANSMISSION_HOME environment
    1010==== GTK+ ====
     11  * Fix crash when adding torrents on systems without G_USER_DIRECTORY_DOWNLOAD
    1112  * Honor the notification sound setting
    1213  * Add a tooltip to files in the torrents' file list
  • trunk/gtk/conf.c

    r13107 r13273  
    6868{
    6969    const char * str;
     70    const char * special_dl_dir = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD );
    7071
    7172    cf_check_older_configs( );
     
    107108    tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 50 );
    108109
    109     str = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD );
    110     tr_bencDictAddStr( d, TR_PREFS_KEY_DOWNLOAD_DIR, str );
     110    tr_bencDictAddStr( d, TR_PREFS_KEY_DOWNLOAD_DIR, special_dl_dir ? special_dl_dir : str );
    111111
    112112    tr_bencDictAddStr( d, PREF_KEY_SORT_MODE, "sort-by-name" );
Note: See TracChangeset for help on using the changeset viewer.