Changeset 10414


Ignore:
Timestamp:
Mar 22, 2010, 12:55:43 AM (12 years ago)
Author:
charles
Message:

(trunk libt) #3004 "Transmission doesn't report to the user errors when saving settings files" -- committed Longinus00's patch to trunk for 2.00

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/resume.c

    r10390 r10414  
    501501
    502502void
    503 tr_torrentSaveResume( const tr_torrent * tor )
    504 {
     503tr_torrentSaveResume( tr_torrent * tor )
     504{
     505    int err;
    505506    tr_benc top;
    506     char *  filename;
     507    char * filename;
     508
    507509
    508510    if( !tr_isTorrent( tor ) )
     
    535537
    536538    filename = getResumeFilename( tor );
    537     tr_bencToFile( &top, TR_FMT_BENC, filename );
     539    if(( err = tr_bencToFile( &top, TR_FMT_BENC, filename )))
     540        tr_torrentSetLocalError( tor, "Unable to save resume file: %s", tr_strerror( err ) );
    538541    tr_free( filename );
    539542
  • trunk/libtransmission/resume.h

    r9868 r10414  
    4646                               const tr_ctor * ctor );
    4747
    48 void     tr_torrentSaveResume( const tr_torrent * tor );
     48void     tr_torrentSaveResume( tr_torrent * tor );
    4949
    5050void     tr_torrentRemoveResume( const tr_torrent * tor );
  • trunk/libtransmission/torrent.c

    r10347 r10414  
    697697        {
    698698            const char * path = tor->info.torrent;
    699             tr_bencToFile( val, TR_FMT_BENC, path );
     699            const int err = tr_bencToFile( val, TR_FMT_BENC, path );
     700            if( err )
     701                tr_torrentSetLocalError( tor, "Unable to save torrent file: %s", tr_strerror( err ) );
    700702            tr_sessionSetTorrentFile( tor->session, tor->info.hashString, path );
    701703        }
Note: See TracChangeset for help on using the changeset viewer.