Changeset 2099


Ignore:
Timestamp:
Jun 16, 2007, 8:11:56 PM (15 years ago)
Author:
charles
Message:

handle BMW's freaky torture test of trying to make .torrent files with aliases to non-existent folders :)

File:
1 edited

Legend:

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

    r2098 r2099  
    5858
    5959    snprintf( buf, sizeof(buf), "%s"TR_PATH_DELIMITER_STR"%s", dir, base );
    60 fprintf(stderr, "looking at [%s]\n", buf);
    6160    i = stat( buf, &sb );
    62 fprintf(stderr, "stat returned %d (%s)\n", i, (i?strerror(errno):"no error"));
     61    if( i ) {
     62        tr_err("makemeta couldn't stat \"%s\"; skipping. (%s)", buf, strerror(errno));
     63        return list;
     64    }
    6365
    6466    if ( S_ISDIR( sb.st_mode ) )
     
    6668        DIR * odir = opendir( buf );
    6769        struct dirent *d;
    68 fprintf(stderr, "it's a directory\n");
    6970        for (d = readdir( odir ); d!=NULL; d=readdir( odir ) )
    7071            if( strcmp( d->d_name,"." ) && strcmp( d->d_name,".." ) )
     
    7677        struct FileList * node = malloc( sizeof( struct FileList ) );
    7778        snprintf( node->filename, sizeof( node->filename ), "%s", buf );
    78 fprintf(stderr, "it's a file... keeping [%s]\n", node->filename);
    7979        node->next = list;
    8080        list = node;
Note: See TracChangeset for help on using the changeset viewer.