]> granicus.if.org Git - transmission/commitdiff
change the callback functions' orders s.t. torrent-completed is called before torrent...
authorJordan Lee <jordan@transmissionbt.com>
Mon, 15 Jul 2013 23:53:48 +0000 (23:53 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Mon, 15 Jul 2013 23:53:48 +0000 (23:53 +0000)
libtransmission/torrent.c

index af64760a22df91776ea7e02f58336274b8c6a19e..d914bf3f27c1142f66df32beb26891ae3e3a119d 100644 (file)
@@ -2164,14 +2164,16 @@ tr_torrentRecheckCompleteness (tr_torrent * tor)
 
           if (tor->currentDir == tor->incompleteDir)
             tr_torrentSetLocation (tor, tor->downloadDir, true, NULL, NULL);
+       }
 
+      fireCompletenessChange (tor, completeness, wasRunning);
+
+      if (tr_torrentIsSeed (tor))
+        {
           if (tr_sessionIsTorrentDoneScriptEnabled (tor->session))
             torrentCallScript (tor, tr_sessionGetTorrentDoneScript (tor->session));
         }
 
-
-      fireCompletenessChange (tor, completeness, wasRunning);
-
       tr_torrentSetDirty (tor);
     }