Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use input file/dir path when seeding #358

Merged
merged 1 commit into from Jun 28, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

use input file/dir path as download path

closes #357
  • Loading branch information
janza committed Jun 13, 2015
commit 13cfc27d7a864b51237a0482509c4e75a981cea8
@@ -12,6 +12,7 @@ var parallel = require('run-parallel')
var parseTorrent = require('parse-torrent')
var speedometer = require('speedometer')
var zeroFill = require('zero-fill')
var path = require('path')

var FSStorage = require('./lib/fs-storage') // browser exclude
var Storage = require('./lib/storage')
@@ -208,6 +209,7 @@ 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

var streams
var torrent = self.add(undefined, opts, function (torrent) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.