If torrent is not private, leave private flag unset

If torrent is not private, leave private flag unset. This ensures that the torrent info hash will match the result generated by other tools, including webtorrent-cli.
This commit is contained in:
Feross Aboukhadijeh
2018-05-25 01:10:40 -07:00
parent a2e5390d30
commit 217ca9a053

View File

@@ -191,9 +191,14 @@ function handleSubmit () {
path: this.state.basePath,
files: this.state.files,
announce: announceList,
private: this.state.isPrivate,
comment: this.state.comment.trim()
}
// If torrent is not private, leave private flag unset. This ensures that
// the torrent info hash will match the result generated by other tools,
// including webtorrent-cli.
if (this.state.isPrivate) options.private = true
dispatch('createTorrent', options)
}