Changeset 2135


Ignore:
Timestamp:
Jun 17, 2007, 4:18:04 PM (15 years ago)
Author:
charles
Message:

better directory walking. (Lacrocivious)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/libtransmission/makemeta.c

    r2132 r2135  
    4343    char buf[MAX_PATH_LENGTH];
    4444    struct stat sb;
     45    DIR * odir = NULL;
    4546    sb.st_size = 0;
    4647
     
    5253    }
    5354
    54     if ( S_ISDIR( sb.st_mode ) )
    55     {
    56         DIR * odir = opendir( buf );
     55    if ( S_ISDIR( sb.st_mode ) && (( odir = opendir ( buf ) )) )
     56    {
    5757        struct dirent *d;
    5858        for (d = readdir( odir ); d!=NULL; d=readdir( odir ) )
Note: See TracChangeset for help on using the changeset viewer.