Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-06-28 14:36:05 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-06-28 14:36:05 +0300
commit6336caa7360c9f66c0892f7f562cb91904abe95a (patch)
tree27f480bf830fc425898515c62e77b3e997c3d9a1 /index.js
parent018fe5807d4996a6ba60e02d0774d10a9c618448 (diff)
respect opts.path option, even when seeding from filesystem
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 4 insertions, 1 deletions
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) {