From b27922d11dfee0e669e3784c6d8cffe9c1166426 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Thu, 24 Mar 2016 18:10:17 -0700 Subject: provide the torrent instance in the opts.store() options --- lib/torrent.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/torrent.js b/lib/torrent.js index 88e8799..4ccd26e 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -344,6 +344,7 @@ Torrent.prototype._onMetadata = function (metadata) { self.store = new ImmediateChunkStore( new self._store(self.pieceLength, { + torrent: self, files: self.files.map(function (file) { return { path: path.join(self.path, file.path), -- cgit v1.2.3