Ignore:
Timestamp:
Dec 22, 2010, 7:06:00 AM (11 years ago)
Author:
charles
Message:

(2.0x) backport r11574 from #3844 "Error popup when adding a relative path"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0x/libtransmission/torrent.c

    r11470 r11575  
    25212521};
    25222522
    2523 static tr_bool
    2524 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 
    25452523static void
    25462524setLocation( void * vdata )
     
    25612539    tr_mkdirp( location, 0777 );
    25622540
    2563     if( !isSameLocation( location, tor->currentDir ) )
     2541    if( !tr_is_same_file( location, tor->currentDir ) )
    25642542    {
    25652543        tr_file_index_t i;
Note: See TracChangeset for help on using the changeset viewer.