Changeset 9498


Ignore:
Timestamp:
Nov 9, 2009, 5:29:38 AM (13 years ago)
Author:
charles
Message:

(trunk gtk) #1483: support an incomplete directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-torrent.c

    r8808 r9498  
    291291tr_torrent_open_folder( TrTorrent * gtor )
    292292{
    293     tr_torrent *    tor = tr_torrent_handle( gtor );
     293    tr_torrent * tor = tr_torrent_handle( gtor );
    294294    const tr_info * info = tr_torrent_info( gtor );
    295     char *          path = info->fileCount == 1
    296                            ? g_build_filename( tr_torrentGetDownloadDir(
    297                                                    tor ), NULL )
    298                            : g_build_filename( tr_torrentGetDownloadDir(
    299                                                    tor ), info->name, NULL );
    300 
     295    const gboolean single = info->fileCount == 1;
     296    char * path = single ? g_build_filename( tr_torrentGetCurrentDir( tor ), info->name, NULL )
     297                         : g_build_filename( tr_torrentGetCurrentDir( tor ), NULL );
    301298    gtr_open_file( path );
    302299    g_free( path );
Note: See TracChangeset for help on using the changeset viewer.