erasedata plugin doesn't erase data (+ workaround)
Hi,
When trying to remove torrent together with all its data the torrent is removed, but the data remains there forever. I'm using ruTorrent git 0a0ca99a85c8ee87f6ddfc7b849a532e9a22e40a and rtorrent 0.9.6-2build1 from Ubuntu 16.04.
After debugging a bit I have found that it happens because fin.sh script to rename .tmp to .list file is never called. Why exactly is it not called is not yet clear to me, but removing the condition (branch) before the command to call fin.sh seems to fix it.
So if you change the line 14 in plugins/erasedata/init.php:
getCmd('branch=').getCmd('d.get_custom5').'=,"'.getCmd('execute').'={'.$thisDir.'/fin.sh,'.$listPath.',$'.getCmd('system.pid').'=,$'.getCmd('d.get_hash').'=,$'.getCmd('d.get_base_path').'=,$'.getCmd('d.is_multi_file').'=,$'.getCmd('d.get_custom5').'=}"')),
to just
getCmd('execute').'={'.$thisDir.'/fin.sh,'.$listPath.',$'.getCmd('system.pid').'=,$'.getCmd('d.get_hash').'=,$'.getCmd('d.get_base_path').'=,$'.getCmd('d.is_multi_file').'=,$'.getCmd('d.get_custom5').'=}')),
removing data with torrent will work again. I have also checked and removing torrent without removing data works too.
Patch here: erasedata.patch.txt
Experiencing similar issues. Cannot delete data via UI. Debian 8.10, apache2, PHP 5.6.33-0+deb8u1, rtorrent 0.9.6/0.13.6 ruTorrent 3.8
rturrent spamming the following
Scheduled command failed: erasedataservername: Bad return code.
No spaces in .rtorrent.rc (system.method lines)
So if you change the line 14
Your changes will have one side effect - torrents data will be removed even if you select 'Delete' (i.e. without data) command.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.