Changeset 8293 for trunk/libtransmission/utils.c
- Timestamp:
- Apr 26, 2009, 7:59:36 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/utils.c
r8247 r8293 33 33 34 34 #include "transmission.h" 35 #include "fdlimit.h" 35 36 #include "ConvertUTF.h" 36 37 #include "list.h" … … 489 490 490 491 /* Load the torrent file into our buffer */ 491 file = fopen( path, "rb");492 file = tr_open_file_for_scanning( path ); 492 493 if( !file ) 493 494 { … … 502 503 const int err = errno; 503 504 tr_err( err_fmt, path, _( "Memory allocation failed" ) ); 504 fclose( file );505 tr_close_file( file ); 505 506 errno = err; 506 507 return NULL; … … 510 511 const int err = errno; 511 512 tr_err( err_fmt, path, tr_strerror( errno ) ); 512 fclose( file );513 tr_close_file( file ); 513 514 free( buf ); 514 515 errno = err; … … 516 517 } 517 518 518 fclose( file );519 tr_close_file( file ); 519 520 *size = sb.st_size; 520 521 return buf;
Note: See TracChangeset
for help on using the changeset viewer.