casey / intermodal

A command-line utility for BitTorrent torrent file creation, verification, and more
https://imdl.io
Creative Commons Zero v1.0 Universal
487 stars 25 forks source link

[Suggestion] "lazy mode" for torrent verify comamnd #535

Open DerBunteBall opened 8 months ago

DerBunteBall commented 8 months ago

imdl should be a bit more tolerant when checking torrents with regard to file names and other things.

Two simple examples:

In practice, torrents are sometimes created from very messy folders.

A classic example is the protruding space character.

Even 0-byte files occur frequently.

Torrent clients sometimes handle this quite clumsily. For example, Transmission removes protruding spaces and does not create 0-byte files.

This procedure means that these torrents are valid and clean for Transmission. In imdl a check fails because of missing files although they are actually there.

This can be remedied by "unclean" renaming and creating empty files with touch.

It might be useful if files were found even if they are there but really only have spaces in front of them. Also 0-byte files should be considered "irrelevant" and simply ignored. This should not break hashes. It would be useful to be able to activate this with an option in the verify command. Something like -lazy or something similar.

Edit: Transmission also appears to remove trailing spaces.

Edit 2: Transmission performs the cleanup for all path parts.