I came across a torrent file that (for reasons unknown) contains empty components in its file paths, and unfortunately torf chokes on it, even when only trying to display the torrent. To reproduce the issue, given a foo.torrent of a directory foo containing a non-empty regular file bar, an empty component can be inserted like this: sed -i 's/3:bar/0:&/' foo.torrent
I came across a torrent file that (for reasons unknown) contains empty components in its file paths, and unfortunately
torf
chokes on it, even when only trying to display the torrent. To reproduce the issue, given afoo.torrent
of a directoryfoo
containing a non-empty regular filebar
, an empty component can be inserted like this:sed -i 's/3:bar/0:&/' foo.torrent