mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk libT) #4383 "transmission-create bug when using leading ./" -- fixed.
This commit is contained in:
parent
d6f9e85850
commit
feb4ddadd5
1 changed files with 8 additions and 8 deletions
|
@ -78,10 +78,7 @@ 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 );
|
||||||
node->filename = tr_strdup( buf + 2 );
|
|
||||||
else
|
|
||||||
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 );
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue