]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #1592: file priorities are not preserved after exiting & starting a...
authorCharles Kerr <charles@transmissionbt.com>
Mon, 12 Jan 2009 18:02:28 +0000 (18:02 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 12 Jan 2009 18:02:28 +0000 (18:02 +0000)
libtransmission/resume.c

index 0ce733eb36089611dcbb62df32e8ccd25bb5a41e..d70992a6ccc6593aa04ea91953e5db4c7393952f 100644 (file)
@@ -228,11 +228,11 @@ loadPriorities( tr_benc *    dict,
     if( tr_bencDictFindList( dict, KEY_PRIORITY, &list )
       && ( tr_bencListSize( list ) == n ) )
     {
-        int64_t         tmp;
+        int64_t priority;
         tr_file_index_t i;
         for( i = 0; i < n; ++i )
-            if( tr_bencGetInt( tr_bencListChild( list, i ), &tmp ) )
-                inf->files[i].priority = tmp;
+            if( tr_bencGetInt( tr_bencListChild( list, i ), &priority ) )
+                tr_torrentInitFilePriority( tor, i, priority );
         ret = TR_FR_PRIORITY;
     }