]> granicus.if.org Git - transmission/commitdiff
fix: update the resume file before running scripts
authorCharles Kerr <ckerr@github.com>
Sat, 2 Feb 2019 03:59:17 +0000 (21:59 -0600)
committerCharles Kerr <ckerr@github.com>
Sat, 2 Feb 2019 03:59:17 +0000 (21:59 -0600)
This is useful if the client script is going to access
the .resume file. Ensuring an up-to-date .resume file
means that user scripts will be able to access it.

libtransmission/torrent.c

index 23a0e9b22e27e6cf8ad3b9b4fd473e9348b72f63..3ebaa665cbcb109e5cf818203fc983673ac1e714 100644 (file)
@@ -2328,6 +2328,8 @@ void tr_torrentRecheckCompleteness(tr_torrent* tor)
 
             if (tr_sessionIsTorrentDoneScriptEnabled(tor->session))
             {
+                tr_torrentSave(tor);
+
                 torrentCallScript(tor, tr_sessionGetTorrentDoneScript(tor->session));
             }
         }