Changeset 9251
- Timestamp:
- Oct 7, 2009, 3:49:55 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r9230 r9251 2321 2321 setLocation( void * vdata ) 2322 2322 { 2323 int err = 0; 2323 tr_bool err = FALSE; 2324 tr_bool verify_needed = FALSE; 2324 2325 struct LocationData * data = vdata; 2325 2326 tr_torrent * tor = data->tor; … … 2359 2360 errno = 0; 2360 2361 tr_torinf( tor, "moving \"%s\" to \"%s\"", oldpath, newpath ); 2361 if( tr_moveFile( oldpath, newpath ) ) { 2362 err = 1; 2363 tr_torerr( tor, "error moving \"%s\" to \"%s\": %s", 2364 oldpath, newpath, tr_strerror( errno ) ); 2362 if( rename( oldpath, newpath ) ) 2363 { 2364 verify_needed = TRUE; 2365 if( tr_moveFile( oldpath, newpath ) ) 2366 { 2367 err = TRUE; 2368 tr_torerr( tor, "error moving \"%s\" to \"%s\": %s", 2369 oldpath, newpath, tr_strerror( errno ) ); 2370 } 2365 2371 } 2366 2372 } … … 2383 2389 { 2384 2390 /* blow away the leftover subdirectories in the old location */ 2385 if( do_move )2391 if( do_move && verify_needed ) 2386 2392 tr_torrentDeleteLocalData( tor, remove ); 2387 2393 2388 2394 /* set the new location and reverify */ 2389 2395 tr_torrentSetDownloadDir( tor, location ); 2390 tr_torrentVerify( tor ); 2396 if( verify_needed ) 2397 tr_torrentVerify( tor ); 2391 2398 } 2392 2399 }
Note: See TracChangeset
for help on using the changeset viewer.