Papanikles / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

[PATCH] stop DataDir from trying to move an empty torrent #874

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I run a setup where RTorrent's default directory is /mnt and then after adding 
a torrent I select the actual download directory (a subdir of /mnt) manually 
with the plugin DataDir before starting the download. After upgrading from 3.5 
to 3.6 this stopped working; DataDir was not anymore able to move the empty 
torrent out of /mnt.

I noticed that moving the empty torrent still works if I unselect the checkbox 
"Move data files" from the "Save to..." dialog. Moving an empty torrent makes 
anyway no sense, so I suggest applying the attached simple patch to 
plugins/datadir/init.js. It checks that if the torrent is empty (zero bytes 
downloaded), and then sets the default state of "Move data files" to unselected 
if the torrent is empty. If the user wants to have the non-existing data files 
moved anyway, he can manually re-select the checkbox.

Original issue reported on code.google.com by villes...@gmail.com on 19 Nov 2013 at 10:32

Attachments: