Using aria2 1.17.0, the remove-unselected-file feature fails to remove unselected dirs.
Example:
Torrent has this layout:
a/1
a/2
b/1
b/2
If you select only file b/1, that's the only file that exists after download - but the directory a also still exists.
Currently aria2 only deletes files and not parent directories. Need to do some traversal to delete directory up to the directory specified by -d option.