From 6336caa7360c9f66c0892f7f562cb91904abe95a Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 28 Jun 2015 04:36:05 -0700 Subject: respect opts.path option, even when seeding from filesystem --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'index.js') diff --git a/index.js b/index.js index c33c9c7..8e638ad 100644 --- a/index.js +++ b/index.js @@ -209,7 +209,10 @@ WebTorrent.prototype.seed = function (input, opts, onseed) { if (!opts) opts = {} opts.noVerify = true opts.createdBy = 'WebTorrent/' + VERSION - opts.path = typeof input === 'string' ? path.dirname(input) : opts.path + + // When seeding from filesystem path, don't perform extra copy to /tmp + // Issue: https://github.com/feross/webtorrent/issues/357 + if (typeof input === 'string' && !opts.path) opts.path = path.dirname(input) var streams var torrent = self.add(undefined, opts, function (torrent) { -- cgit v1.2.3