Changeset 12581


Ignore:
Timestamp:
Jul 24, 2011, 8:18:33 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4383 "transmission-create bug when using leading ./" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

    r12545 r12581  
    7979        struct FileList * node = tr_new( struct FileList, 1 );
    8080        node->size = sb.st_size;
    81         if( ( buf[0] == '.' ) && ( buf[1] == '/' ) )
    82             node->filename = tr_strdup( buf + 2 );
    83         else
    84             node->filename = tr_strdup( buf );
     81        node->filename = tr_strdup( buf );
    8582        node->next = list;
    8683        list = node;
     
    117114
    118115tr_metainfo_builder*
    119 tr_metaInfoBuilderCreate( const char * topFile )
    120 {
    121     int                   i;
    122     struct FileList *     files;
    123     struct FileList *     walk;
     116tr_metaInfoBuilderCreate( const char * topFileArg )
     117{
     118    int i;
     119    struct FileList * files;
     120    struct FileList * walk;
     121    char topFile[TR_PATH_MAX];
    124122    tr_metainfo_builder * ret = tr_new0( tr_metainfo_builder, 1 );
     123
     124    tr_realpath( topFileArg, topFile );
    125125
    126126    ret->top = tr_strdup( topFile );
Note: See TracChangeset for help on using the changeset viewer.