Changeset 8776
- Timestamp:
- Jul 3, 2009, 2:37:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/metainfo.c
r8775 r8776 61 61 { 62 62 int i; 63 const char * tags[] = { "beos", "cli", "daemon", "gtk", "macosx", "wx" };64 const int tagCount = 6;65 63 char * path; 66 64 struct stat sb; 67 65 const int tagCount = 5; 66 const char * tags[] = { "beos", "cli", "daemon", "macosx", "wx" }; 67 68 /* test the beos, cli, daemon, macosx, wx tags */ 68 69 for( i=0; i<tagCount; ++i ) { 69 70 path = tr_strdup_printf( "%s%c%s-%s", tr_getTorrentDir( session ), '/', inf->hashString, tags[i] ); … … 73 74 } 74 75 76 /* test a non-tagged file */ 75 77 path = tr_buildPath( tr_getTorrentDir( session ), inf->hashString, NULL ); 76 78 if( !stat( path, &sb ) && ( ( sb.st_mode & S_IFMT ) == S_IFREG ) ) … … 78 80 tr_free( path ); 79 81 80 return NULL; 82 /* return the -gtk form by default, since that's the most common case. 83 don't bother testing stat() on it since this is the last candidate 84 and we don't want to return NULL anyway */ 85 return tr_strdup_printf( "%s%c%s-%s", tr_getTorrentDir( session ), '/', inf->hashString, "gtk" ); 81 86 } 82 87
Note: See TracChangeset
for help on using the changeset viewer.