rndusr / torf

Python module to create, parse and edit torrent files and magnet links
GNU General Public License v3.0
180 stars 17 forks source link

Ignore empty components of file paths in torrent #14

Closed sinic closed 4 years ago

sinic commented 4 years ago

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

rndusr commented 4 years ago

Thanks!