diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-06-28 14:36:05 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-06-28 14:36:05 +0300 |
commit | 6336caa7360c9f66c0892f7f562cb91904abe95a (patch) | |
tree | 27f480bf830fc425898515c62e77b3e997c3d9a1 /index.js | |
parent | 018fe5807d4996a6ba60e02d0774d10a9c618448 (diff) |
respect opts.path option, even when seeding from filesystem
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |