Invalid torrent identifier bug
gyzerok opened this issue · 3 comments
gyzerok commented
I'm always getting this exception while trying to parse torrent file using:
parseTorrent(fs.readFileSync(path))
It seems to me files are ok since BitTorrent handles them correctly.
Dunno if its ok to give you link here.
gyzerok commented
The problem here is that Buffer.isBuffer returns false on result of fs.readFileSync. Solution:
parseTorrent(new Buffer(fs.readFileSync(path, { encoding: 'utf8' })))
But after this I'm getting exception Invalid data: Missing delimiter ":" [0x3a]
from parse-torrent-file module.
Any ideas?
feross commented
I think there's some other major issue with your code. Buffer.isBuffer(fs.readFileSync(pathToFile))
always returns true
, unless there's some edge case I'm not aware of.
If you can't figure it out, email me the file you think isn't working (email is on my profile).