Changeset 12701


Ignore:
Timestamp:
Aug 20, 2011, 6:41:45 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) improve the is_same_file() test in deleteLocalData() to handle nonexistent directories too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r12692 r12701  
    28392839        dir = tr_dirname( filename );
    28402840        tr_free( filename );
    2841 
    2842         if( !tr_is_same_file( top, dir ) ) {
     2841        if( !tr_is_same_file( top, dir ) && strcmp( top, dir ) ) {
    28432842            for( ;; ) {
    28442843                char * parent = tr_dirname( dir );
    2845                 if( tr_is_same_file( top, parent ) ) {
     2844                if( tr_is_same_file( top, parent ) || !strcmp( top, parent ) ) {
    28462845                    if( tr_ptrArrayFindSorted( &folders, dir, vstrcmp ) == NULL ) {
    28472846                        tr_ptrArrayInsertSorted( &folders, tr_strdup( dir ), vstrcmp );
Note: See TracChangeset for help on using the changeset viewer.