mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 227 forks source link

Problem with directory name when pass options object. #192

Open umartinez22 opened 5 years ago

umartinez22 commented 5 years ago

When options object is passing by arguments like var engine = torrentStream(link, options);, the options object is mutated and the path value will be the same for others execution.

For example:

var engine = torrentStream(link, options); engine = torrentStream(otherLink, options);

Then when the torrent is downloading the directory name (with hash) is the same for all file.

Posible soluction: