]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #2995 "Incompletely downloaded files not trashed" -- fixed in trunk...
authorCharles Kerr <charles@transmissionbt.com>
Sun, 28 Feb 2010 15:27:48 +0000 (15:27 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 28 Feb 2010 15:27:48 +0000 (15:27 +0000)
libtransmission/torrent.c

index a66f89333fb3cb6424a3783c2a6d39c459aab11c..806af206fc77218b3484b095c29e76939b7961c1 100644 (file)
@@ -2344,8 +2344,8 @@ deleteLocalData( tr_torrent * tor, tr_fileFunc fileFunc )
             deleteLocalFile( s[i], fileFunc );
 
     /* now blow away any remaining torrent files, such as torrent files in dirty folders */
-    for( f=0; f<tor->info.fileCount; ++f ) {
-        char * path = tr_buildPath( tor->currentDir, tor->info.files[f].name, NULL );
+    for( i=0, n=tr_ptrArraySize( &torrentFiles ); i<n; ++i ) {
+        char * path = tr_buildPath( tor->currentDir, tr_ptrArrayNth( &torrentFiles, i ), NULL );
         deleteLocalFile( path, fileFunc );
         tr_free( path );
     }