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:
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) {