Bug: I2PSnark changes filenames
Posted: 28 Apr 2026 11:43
I2PSnark arbitrarily changes filenames, even though all the characters used are valid UTF-8 characters.
Here is an example of a directory name (the language doesn't matter here) and the corresponding torrent file created using the popular third-party program “mktorrent” (the quotation marks are used here only to indicate where the names begin and end):
"Dieser Verzeichnisname einhält ein Fragezeichen?"
"Dieser Verzeichnisname einhält ein Fragezeichen?.torrent"
I2PSnark automatically recognizes the created torrent file without any issues. However, when it comes to the directory name, the question mark is replaced with an underscore – without prompting. The result at the file system level now looks like this:
"Dieser Verzeichnisname einhält ein Fragezeichen?"
"Dieser Verzeichnisname einhält ein Fragezeichen?.torrent"
"Dieser Verzeichnisname einhält ein Fragezeichen_"
This torrent is now broken. This is because the directory with an underscore used by I2PSnark contains no data, so it is attempting to download it from the tracker.
This behavior is inconsistent in itself. The torrent file is accepted, but its contents are not.
The correct approach would be to fully inform users of the restrictions associated with this software and reject the torrent accordingly. However, this is not being done, which is why it is a self-inflicted bug.
Version: i2psnark-standalone-2.9.0
Here is an example of a directory name (the language doesn't matter here) and the corresponding torrent file created using the popular third-party program “mktorrent” (the quotation marks are used here only to indicate where the names begin and end):
"Dieser Verzeichnisname einhält ein Fragezeichen?"
"Dieser Verzeichnisname einhält ein Fragezeichen?.torrent"
I2PSnark automatically recognizes the created torrent file without any issues. However, when it comes to the directory name, the question mark is replaced with an underscore – without prompting. The result at the file system level now looks like this:
"Dieser Verzeichnisname einhält ein Fragezeichen?"
"Dieser Verzeichnisname einhält ein Fragezeichen?.torrent"
"Dieser Verzeichnisname einhält ein Fragezeichen_"
This torrent is now broken. This is because the directory with an underscore used by I2PSnark contains no data, so it is attempting to download it from the tracker.
This behavior is inconsistent in itself. The torrent file is accepted, but its contents are not.
The correct approach would be to fully inform users of the restrictions associated with this software and reject the torrent accordingly. However, this is not being done, which is why it is a self-inflicted bug.
Version: i2psnark-standalone-2.9.0