Changeset 2156


Ignore:
Timestamp:
Jun 18, 2007, 8:56:04 PM (15 years ago)
Author:
charles
Message:

make the torrent file parser errors more useful. (John_Clay)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r2154 r2156  
    556556
    557557    /* try to stat the file */
     558    errno = 0;
    558559    if( stat( path, &sb ) )
    559560    {
    560         tr_err( "Could not stat file (%s)", path );
     561        tr_err( "Couldn't stat file \"%s\" %s", path, strerror(errno) );
    561562        return NULL;
    562563    }
     
    578579    if( !file )
    579580    {
    580         tr_err( "Could not open file (%s)", path );
     581        tr_err( "Couldn't open file \"%s\" %s", path, strerror(errno) );
    581582        return NULL;
    582583    }
     
    584585    if( NULL == buf )
    585586    {
    586         tr_err( "Could not allocate memory (%"PRIu64" bytes)",
     587        tr_err( "Couldn't allocate memory (%"PRIu64" bytes)",
    587588                ( uint64_t )sb.st_size );
    588589    }
     
    590591    if( fread( buf, sb.st_size, 1, file ) != 1 )
    591592    {
    592         tr_err( "Read error (%s)", path );
     593        tr_err( "Error reading \"%s\" %s", path, strerror(errno) );
    593594        free( buf );
    594595        fclose( file );
Note: See TracChangeset for help on using the changeset viewer.