Changeset 11575 for branches/2.0x/libtransmission/torrent.c
- Timestamp:
- Dec 22, 2010, 7:06:00 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0x/libtransmission/torrent.c
r11470 r11575 2521 2521 }; 2522 2522 2523 static tr_bool2524 isSameLocation( const char * path1, const char * path2 )2525 {2526 struct stat s1, s2;2527 const int err1 = stat( path1, &s1 );2528 const int err2 = stat( path2, &s2 );2529 2530 if( !err1 && !err2 ) {2531 tr_dbg( "path1 dev:inode is %"PRIu64":%"PRIu64"; "2532 "path2 dev:inode is %"PRIu64":%"PRIu64,2533 (uint64_t)s1.st_dev, (uint64_t)s1.st_ino,2534 (uint64_t)s2.st_dev, (uint64_t)s2.st_ino );2535 return ( s1.st_dev == s2.st_dev )2536 && ( s1.st_ino == s2.st_ino );2537 }2538 2539 /* either one, or the other, or both don't exist... */2540 tr_dbg( "stat(%s) returned %d\n", path1, err1 );2541 tr_dbg( "stat(%s) returned %d\n", path2, err2 );2542 return FALSE;2543 }2544 2545 2523 static void 2546 2524 setLocation( void * vdata ) … … 2561 2539 tr_mkdirp( location, 0777 ); 2562 2540 2563 if( ! isSameLocation( location, tor->currentDir ) )2541 if( !tr_is_same_file( location, tor->currentDir ) ) 2564 2542 { 2565 2543 tr_file_index_t i;
Note: See TracChangeset
for help on using the changeset viewer.