Ignore:
Timestamp:
Oct 19, 2009, 5:05:00 AM (12 years ago)
Author:
charles
Message:

(trunk) #1483: move completed torrents to a user-specified directory + #629: different file extension for incomplete files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/verify.c

    r9287 r9328  
    8080        if( !filePos && (fd<0) )
    8181        {
    82             char * filename = tr_buildPath( tor->downloadDir, file->name, NULL );
    83             fd = tr_open_file_for_scanning( filename );
     82            char * filename = tr_torrentFindFile( tor, fileIndex );
     83            fd = filename == NULL ? -1 : tr_open_file_for_scanning( filename );
    8484            /* fprintf( stderr, "opening file #%d (%s) -- %d\n", fileIndex, filename, fd ); */
    8585            tr_free( filename );
     
    255255    {
    256256        struct stat sb;
    257         char * path = tr_buildPath( tor->downloadDir, tor->info.files[i].name, NULL );
    258         if( !stat( path, &sb ) && ( sb.st_size > 0 ) )
     257        char * path = tr_torrentFindFile( tor, i );
     258        if( ( path != NULL ) && !stat( path, &sb ) && ( sb.st_size > 0 ) )
    259259            hasAny = TRUE;
    260260        tr_free( path );
Note: See TracChangeset for help on using the changeset viewer.