I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit d4f1230b authored by zzz's avatar zzz
Browse files

better error message when finding HTML instead of metainfo

parent 7701693d
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,9 @@ public class BDecoder
public BEValue bdecodeMap() throws IOException
{
int c = getNextIndicator();
if (c != 'd')
if (c == '<')
throw new InvalidBEncodingException("Expected a .torrent metainfo file but found HTML? Check URL or file!");
else if (c != 'd')
throw new InvalidBEncodingException("Expected 'd', not '"
+ (char)c + "'");
indicator = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment