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

(trunk gtk) #3844 "error popup when adding a relative path" -- fixed. initial patch by ijuxda.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11570 r11574  
    27822782};
    27832783
    2784 static tr_bool
    2785 isSameLocation( const char * path1, const char * path2 )
    2786 {
    2787     struct stat s1, s2;
    2788     const int err1 = stat( path1, &s1 );
    2789     const int err2 = stat( path2, &s2 );
    2790 
    2791     if( !err1 && !err2 ) {
    2792         tr_dbg( "path1 dev:inode is %"PRIu64":%"PRIu64"; "
    2793                 "path2 dev:inode is %"PRIu64":%"PRIu64,
    2794                 (uint64_t)s1.st_dev, (uint64_t)s1.st_ino,
    2795                 (uint64_t)s2.st_dev, (uint64_t)s2.st_ino );
    2796         return ( s1.st_dev == s2.st_dev )
    2797             && ( s1.st_ino == s2.st_ino );
    2798     }
    2799 
    2800     /* either one, or the other, or both don't exist... */
    2801     tr_dbg( "stat(%s) returned %d\n", path1, err1 );
    2802     tr_dbg( "stat(%s) returned %d\n", path2, err2 );
    2803     return FALSE;
    2804 }
    2805 
    28062784static void
    28072785setLocation( void * vdata )
     
    28212799    tr_mkdirp( location, 0777 );
    28222800
    2823     if( !isSameLocation( location, tor->currentDir ) )
     2801    if( !tr_is_same_file( location, tor->currentDir ) )
    28242802    {
    28252803        tr_file_index_t i;
Note: See TracChangeset for help on using the changeset viewer.