Ignore:
Timestamp:
Nov 10, 2006, 9:30:32 PM (15 years ago)
Author:
titer
Message:

Handle torrents with empty folders (fixes #12)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fastresume.h

    r1060 r1074  
    9292            return 1;
    9393        }
    94         if( ( sb.st_mode & S_IFMT ) != S_IFREG )
     94        if( ( sb.st_mode & S_IFMT ) == S_IFREG )
    9595        {
    96             tr_err( "Wrong st_mode for '%s'", path );
    97             free( path );
    98             return 1;
     96#ifdef SYS_DARWIN
     97            tab[i] = ( sb.st_mtimespec.tv_sec & 0x7FFFFFFF );
     98#else
     99            tab[i] = ( sb.st_mtime & 0x7FFFFFFF );
     100#endif
     101        }
     102        else
     103        {
     104            /* Empty folder */
     105            tab[i] = 0;
    99106        }
    100107        free( path );
    101 
    102 #ifdef SYS_DARWIN
    103         tab[i] = ( sb.st_mtimespec.tv_sec & 0x7FFFFFFF );
    104 #else
    105         tab[i] = ( sb.st_mtime & 0x7FFFFFFF );
    106 #endif
    107108    }
    108109
Note: See TracChangeset for help on using the changeset viewer.