diff --git a/index.js b/index.js index 7466a9e5..3b5e6f72 100644 --- a/index.js +++ b/index.js @@ -257,13 +257,20 @@ class WebTorrent extends EventEmitter { this._debug('seed') opts = opts ? Object.assign({}, opts) : {} + // no need to verify the hashes we create + opts.skipVerify = true + + const isFilePath = typeof input === 'string' + // When seeding from fs path, initialize store from that path to avoid a copy - if (typeof input === 'string') opts.path = path.dirname(input) + if (isFilePath) opts.path = path.dirname(input) if (!opts.createdBy) opts.createdBy = `WebTorrent/${VERSION_STR}` const onTorrent = torrent => { const tasks = [ cb => { + // when a filesystem path is specified, files are already in the FS store + if (isFilePath) return cb() torrent.load(streams, cb) } ]