Erase data (all) deletes *EVERYTHING
We've had a lot of users loose all their torrents due to this option. Finally one of our users found the reproduction for this issue:
- Add a torrent with a directory in it, and select the "Don't add torrent's name to path".
- Do "Remove and Delete Data (All)" on torrent #1. It will delete the whole directory containing the files from #1, even if there are files from other torrents in the directory.
This will result in all torrents data removed. ie. if the default download directory is /home/USERNAME/data, everything under that directory will be deleted.
This is a normal plugin behavior. But I can to add an option to config for disabling this command, if you need this.
Somehow i doubt this was the intention that user looses all their data on that download directory. Users are loosing all other torrents as well, not just the one they want to delete, but every single other too.
What was it supposed to even differently than the normal remove torrent + delete data?
Option to disable that would be minimum tbh
Users are loosing all other torrents as well
Russians have a good proverb for this case. About a fool and dick from glass. "Don't add torrent's name to path" - is a dangerous option. And user must know what he makes, when he uses it. For example, two different torrents will have a files/directories wit a same name. And?
What was it supposed to even differently than the normal remove torrent + delete data?
You may have auto-unpacked data in the torrent's directory.
Option to disable that would be minimum tbh
OK
Ah ok, so it has a practical use case.
I wonder if we should rather disable the option "Don't add torrent's name to path" rather than this option.
OK, I will add both options.
Coming from helpdesk btw; You can never trust user to know what he/she is doing. There is varying skill levels, and ways to use are as varied as there are users. User out of his skill level would be completely happy to do rm -rf / if someone instructed them to do it, not knowing what he/she is doing.
Part of the issue is that the label for the second option is unclear. "All" is ambiguous. If the only extra behavior is deleting the directory, then "Remove and Delete Data (All)" could be "Remove and Delete Directory","Remove and Delete Folder" or "Remove and Delete Path" instead.
This one got me once - I figured deleting all of a torrent's data would be a good idea - and then I noticed a huge chunk of files missing. You live and learn though. :P
Maybe a more explanatory warning on the prompt might help, like:
Do you really want to remove the selected torrent(s)?
WARNING: This will delete all files in this torrent's current directory.
That would give a hint that if a file is not in a directory of its own...proceed at your own peril.
OK, I will add both options.
In the conf/access.ini:
canAddTorrentsWithoutPath = yes canAddTorrentsWithoutStarting = yes canAddTorrentsWithResume = yes canAddTorrentsWithRandomizeHash = yes
In the plugins/erasedata/conf.php:
$enableForceDeletion = false;
Part of the issue is that the label for the second option is unclear. Maybe a more explanatory warning on the prompt might help, like:
Also was changed.
I've updated from stable to master and couldn't find the erase with all data option. It would be nice to have that information in the FAQ section. I've spent about an hour looking through commits to finally find this issue.
It would also be handy if admin could define the $enableForceDeletion variable through conf/plugins.ini, so it could be easier to remember.