1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

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

This commit is contained in:
Jordan Lee 2011-07-24 20:18:33 +00:00
parent d6f9e85850
commit feb4ddadd5

View file

@ -78,9 +78,6 @@ getFiles( const char * dir,
{ {
struct FileList * node = tr_new( struct FileList, 1 ); struct FileList * node = tr_new( struct FileList, 1 );
node->size = sb.st_size; node->size = sb.st_size;
if( ( buf[0] == '.' ) && ( buf[1] == '/' ) )
node->filename = tr_strdup( buf + 2 );
else
node->filename = tr_strdup( buf ); node->filename = tr_strdup( buf );
node->next = list; node->next = list;
list = node; list = node;
@ -116,13 +113,16 @@ builderFileCompare( const void * va, const void * vb )
} }
tr_metainfo_builder* tr_metainfo_builder*
tr_metaInfoBuilderCreate( const char * topFile ) tr_metaInfoBuilderCreate( const char * topFileArg )
{ {
int i; int i;
struct FileList * files; struct FileList * files;
struct FileList * walk; struct FileList * walk;
char topFile[TR_PATH_MAX];
tr_metainfo_builder * ret = tr_new0( tr_metainfo_builder, 1 ); tr_metainfo_builder * ret = tr_new0( tr_metainfo_builder, 1 );
tr_realpath( topFileArg, topFile );
ret->top = tr_strdup( topFile ); ret->top = tr_strdup( topFile );
{ {