Ignore:
Timestamp:
Oct 27, 2009, 11:00:34 PM (13 years ago)
Author:
charles
Message:

(trunk libT) #2531: when the user moves a torrent from one location to another, we don't need to reverify if the files are just rename()d

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r9382 r9421  
    13561356
    13571357int
    1358 tr_moveFile( const char * oldpath, const char * newpath )
     1358tr_moveFile( const char * oldpath, const char * newpath, tr_bool * renamed )
    13591359{
    13601360    int in;
     
    13861386    }
    13871387
    1388     /* they  might be on the same filesystem... */
    1389     if( !rename( oldpath, newpath ) )
    1390         return 0;
     1388    /* they might be on the same filesystem... */
     1389    {
     1390        const int i = rename( oldpath, newpath );
     1391        if( renamed != NULL )
     1392            *renamed = i == 0;
     1393        if( !i )
     1394            return 0;
     1395    }
    13911396
    13921397    /* copy the file */
Note: See TracChangeset for help on using the changeset viewer.