Changeset 11838


Ignore:
Timestamp:
Feb 6, 2011, 6:56:44 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) #3975 "tr_bencToFile() contains unnecessary calls to stat() and unlink()" -- fixed for win32.

remove() doesn't have the same behavior on Windows. On that platform, we should use MoveFileEx?( oldpath, newpath, MOVEFILE_REPLACE_EXISTING )." Thanks to rb07 for testing & confirming the fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r11821 r11838  
    17081708            tr_close_file( fd );
    17091709
     1710#ifdef WIN32
     1711            if( MoveFileEx( tmp, filename, MOVEFILE_REPLACE_EXISTING ) )
     1712#else
    17101713            if( !rename( tmp, filename ) )
     1714#endif
    17111715            {
    17121716                tr_inf( _( "Saved \"%s\"" ), filename );
Note: See TracChangeset for help on using the changeset viewer.