Ticket #123: libtransmission.diff

File libtransmission.diff, 3.9 KB (added by afxgroup, 16 years ago)
  • libtransmission/platform.c

     
    4747            {
    4848                continue;
    4949            }
     50#ifndef __AMIGAOS4__
    5051            snprintf( oldFile, MAX_PATH_LENGTH, "%s/%s",
    5152                      oldDirectory, dirp->d_name );
    5253            snprintf( newFile, MAX_PATH_LENGTH, "%s/%s",
    5354                      newDirectory, dirp->d_name );
     55#else
     56            snprintf( oldFile, MAX_PATH_LENGTH, "%s%s",
     57                      oldDirectory, dirp->d_name );
     58            snprintf( newFile, MAX_PATH_LENGTH, "%s%s",
     59                      newDirectory, dirp->d_name );
     60#endif
    5461            rename( oldFile, newFile );
    5562        }
    5663
  • libtransmission/inout.c

     
    236236
    237237    for( i = 0; i < inf->fileCount; i++ )
    238238    {
     239#ifndef __AMIGAOS4__
    239240        asprintf( &path, "%s/%s", tor->destination, inf->files[i].name );
     241#else
     242        asprintf( &path, "%s%s", tor->destination, inf->files[i].name );
     243#endif
    240244
    241245        /* Create folders */
    242246        if( NULL != ( p = strrchr( path, '/' ) ) )
     
    366370
    367371    for( i = 0; i < inf->fileCount; i++ )
    368372    {
     373#ifndef __AMIGAOS4__
    369374        asprintf( &path, "%s/%s", tor->destination, inf->files[i].name );
     375#else
     376        asprintf( &path, "%s%s", tor->destination, inf->files[i].name );
     377#endif
    370378        tr_fdFileClose( tor->fdlimit, path );
    371379        free( path );
    372380    }
     
    434442        }
    435443
    436444        /* Now let's get a stream on the file... */
     445#ifndef __AMIGAOS4__
    437446        asprintf( &path, "%s/%s", tor->destination, inf->files[i].name );
     447#else
     448        asprintf( &path, "%s%s", tor->destination, inf->files[i].name );
     449#endif
    438450        file = tr_fdFileOpen( tor->fdlimit, path );
    439451        if( file < 0 )
    440452        {
  • libtransmission/metainfo.c

     
    5252
    5353    if ( NULL != savedHash )
    5454    {
     55#ifndef __AMIGAOS4__
    5556        snprintf( inf->torrent, MAX_PATH_LENGTH, "%s/%s",
    5657                  tr_getTorrentsDirectory(), savedHash );
     58#else
     59        snprintf( inf->torrent, MAX_PATH_LENGTH, "%s%s",
     60                  tr_getTorrentsDirectory(), savedHash );
     61#endif
    5762        path = inf->torrent;
    5863    }
    5964
     
    117122    if( saveCopy )
    118123    {
    119124        /* Save a copy of the torrent file in the private torrent directory */
     125#ifndef __AMIGAOS4__
    120126        snprintf( inf->torrent, MAX_PATH_LENGTH, "%s/%s",
    121127                  tr_getTorrentsDirectory(), inf->hashString );
     128#else
     129        snprintf( inf->torrent, MAX_PATH_LENGTH, "%s%s",
     130                  tr_getTorrentsDirectory(), inf->hashString );
     131#endif
    122132        file = fopen( inf->torrent, "wb" );
    123133        if( !file )
    124134        {
     
    275285{
    276286    char file[MAX_PATH_LENGTH];
    277287
     288#ifndef __AMIGAOS4__
    278289    snprintf( file, MAX_PATH_LENGTH, "%s/%s",
    279290              tr_getTorrentsDirectory(), hashString );
     291#else
     292    snprintf( file, MAX_PATH_LENGTH, "%s%s",
     293              tr_getTorrentsDirectory(), hashString );
     294#endif
    280295    unlink(file);
    281296}
    282297
  • libtransmission/fastresume.h

     
    8282
    8383    for( i = 0; i < inf->fileCount; i++ )
    8484    {
     85#ifndef __AMIGAOS4__
    8586        asprintf( &path, "%s/%s", tor->destination, inf->files[i].name );
    86         if( stat( path, &sb ) )
     87#else
     88        asprintf( &path, "%s%s", tor->destination, inf->files[i].name );
     89#endif        if( stat( path, &sb ) )
    8790        {
    8891            tr_err( "Could not stat '%s'", path );
    8992            free( path );